Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
662d6a17
Commit
662d6a17
authored
11 years ago
by
Richard Linden
Browse files
Options
Downloads
Patches
Plain Diff
added compile time warnings to use of deprecated llinfos, llwarns, etc.
parent
cf014375
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llerror.h
+7
-7
7 additions, 7 deletions
indra/llcommon/llerror.h
indra/llcommon/llpreprocessor.h
+13
-0
13 additions, 0 deletions
indra/llcommon/llpreprocessor.h
indra/llui/llstatbar.cpp
+1
-1
1 addition, 1 deletion
indra/llui/llstatbar.cpp
with
21 additions
and
8 deletions
indra/llcommon/llerror.h
+
7
−
7
View file @
662d6a17
...
...
@@ -355,13 +355,13 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, ##__VA_ARGS__)
#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, ##__VA_ARGS__)
// DEPRECATED: Use the new macros that allow tags and *look* like macros.
//#define lldebugs LL_DEBUGS()
#define llinfos LL_INFOS()
//#define llwarns LL_WARNS()
//#define llerrs LL_ERRS()
//#define llcont LL_CONT
#define llendl LL_ENDL
#define lldebugs LL_COMPILE_TIME_WARNING("Warning: lldebugs deprecated, use LL_DEBUGS() instead"); LL_DEBUGS()
#define llinfos LL_COMPILE_TIME_WARNING("Warning: llinfos deprecated, use LL_INFOS() instead"); LL_INFOS()
#define llwarns LL_COMPILE_TIME_WARNING("Warning: llwarns deprecated, use LL_WARNS() instead"); LL_WARNS()
#define llerrs LL_COMPILE_TIME_WARNING("Warning: llerrs deprecated, use LL_ERRS() instead"); LL_ERRS()
#define llcont LL_COMPILE_TIME_WARNING("Warning: llcont deprecated, use LL_CONT instead"); LL_CONT
#define llendl LL_COMPILE_TIME_WARNING("Warning: llendl deprecated, use LL_ENDL instead"); LL_ENDL
#endif // LL_LLERROR_H
This diff is collapsed.
Click to expand it.
indra/llcommon/llpreprocessor.h
+
13
−
0
View file @
662d6a17
...
...
@@ -188,4 +188,17 @@
#elif LL_DARWIN
#define LL_TYPEOF(exp) typeof(exp)
#endif
#define LL_TO_STRING_HELPER(x) #x
#define LL_TO_STRING(x) LL_TO_STRING_HELPER(x)
#define LL_FILE_LINENO(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg
#if LL_WINDOWS
#define LL_COMPILE_TIME_WARNING(msg) __pragma(message(LL_FILE_LINENO(msg)))
#define LL_COMPILE_TIME_ERROR(msg) static_assert(false, msg)
#else
// no way to get gcc 4.2 to print a user-defined diagnostic message only when a macro is used
#define LL_COMPILE_TIME_WARNING(msg)
#define LL_COMPILE_TIME_ERROR(msg)
#endif
#endif // not LL_LINDEN_PREPROCESSOR_H
This diff is collapsed.
Click to expand it.
indra/llui/llstatbar.cpp
+
1
−
1
View file @
662d6a17
...
...
@@ -325,7 +325,7 @@ void LLStatBar::draw()
{
const
LLTrace
::
TraceType
<
LLTrace
::
CountAccumulator
>&
count_stat
=
*
mCountFloatp
;
unit_label
=
mUnitLabel
.
empty
()
?
(
std
::
string
(
count_stat
.
getUnitLabel
())
+
"/s"
)
:
mUnitLabel
;
unit_label
=
std
::
string
(
count_stat
.
getUnitLabel
())
+
"/s"
;
current
=
last_frame_recording
.
getPerSec
(
count_stat
);
min
=
frame_recording
.
getPeriodMinPerSec
(
count_stat
,
num_frames
);
max
=
frame_recording
.
getPeriodMaxPerSec
(
count_stat
,
num_frames
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment