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
192e6915
Commit
192e6915
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken usage of absl::format exposed by clang
parent
b75d18df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llsdserialize.cpp
+10
-3
10 additions, 3 deletions
indra/llcommon/llsdserialize.cpp
indra/llcommon/llsdserialize.h
+3
-1
3 additions, 1 deletion
indra/llcommon/llsdserialize.h
indra/llcommon/llsdserialize_xml.cpp
+1
-1
1 addition, 1 deletion
indra/llcommon/llsdserialize_xml.cpp
with
14 additions
and
5 deletions
indra/llcommon/llsdserialize.cpp
+
10
−
3
View file @
192e6915
...
...
@@ -1230,7 +1230,14 @@ void LLSDFormatter::boolalpha(bool alpha)
void
LLSDFormatter
::
realFormat
(
const
std
::
string
&
format
)
{
mRealFormat
=
format
;
if
(
!
format
.
empty
())
{
mRealFormat
=
absl
::
ParsedFormat
<
absl
::
FormatConversionCharSet
::
kFloating
>::
New
(
format
);
if
(
!
mRealFormat
)
{
LL_WARNS
()
<<
"Invalid real format spec: "
<<
format
<<
LL_ENDL
;
}
}
}
S32
LLSDFormatter
::
format
(
const
LLSD
&
data
,
std
::
ostream
&
ostr
)
const
...
...
@@ -1246,7 +1253,7 @@ S32 LLSDFormatter::format(const LLSD& data, std::ostream& ostr, EFormatterOption
void
LLSDFormatter
::
formatReal
(
LLSD
::
Real
real
,
std
::
ostream
&
ostr
)
const
{
ostr
<<
absl
::
StreamFormat
(
mRealFormat
.
c_str
()
,
real
);
ostr
<<
absl
::
StreamFormat
(
*
mRealFormat
,
real
);
}
/**
...
...
@@ -1354,7 +1361,7 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr,
case
LLSD
::
TypeReal
:
ostr
<<
"r"
;
if
(
mRealFormat
.
empty
()
)
if
(
!
mRealFormat
)
{
ostr
<<
data
.
asReal
();
}
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llsdserialize.h
+
3
−
1
View file @
192e6915
...
...
@@ -34,6 +34,8 @@
#include
"llrefcount.h"
#include
"llsd.h"
#include
"absl/strings/str_format.h"
/**
* @class LLSDParser
* @brief Abstract base class for LLSD parsers.
...
...
@@ -500,7 +502,7 @@ class LL_COMMON_API LLSDFormatter : public LLRefCount
void
formatReal
(
LLSD
::
Real
real
,
std
::
ostream
&
ostr
)
const
;
bool
mBoolAlpha
;
std
::
string
mRealFormat
;
std
::
unique_ptr
<
absl
::
ParsedFormat
<
absl
::
FormatConversionCharSet
::
kFloating
>
>
mRealFormat
;
EFormatterOptions
mOptions
;
};
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llsdserialize_xml.cpp
+
1
−
1
View file @
192e6915
...
...
@@ -150,7 +150,7 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr,
case
LLSD
::
TypeReal
:
ostr
<<
pre
<<
"<real>"
;
if
(
mRealFormat
.
empty
()
)
if
(
!
mRealFormat
)
{
ostr
<<
data
.
asReal
();
}
...
...
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