Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
Base
Commits
a82a3715
Commit
a82a3715
authored
Feb 11, 2020
by
Martin Marinov
Browse files
Fix Linux sanitized build errors in Journal
parent
0e0be2e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Journal/JournalCppDefs.cc
View file @
a82a3715
...
...
@@ -42,55 +42,55 @@ template <> Data define(Stream&, const std::nullptr_t&)
JOURNAL_ADD_TYPE_EXTERNAL
(
bool
,
_b
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
_b
?
"true"
:
"false"
);
}
JOURNAL_ADD_TYPE
(
char
,
_c
)
{
// TODO: (unsigned char can be output as a symbol in many cases)
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_c
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
unsigned
char
,
_c
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_c
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
short
,
_i
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_i
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
unsigned
short
,
_u
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_u
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
int
,
_i
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_i
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
unsigned
int
,
_u
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_u
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
size_t
,
_s
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_s
));
}
JOURNAL_ADD_TYPE_EXTERNAL
(
float
,
_f
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
Base
::
OStringStream
os
;
os
<<
_f
;
...
...
@@ -106,7 +106,7 @@ JOURNAL_ADD_TYPE_EXTERNAL(float, _f)
JOURNAL_ADD_TYPE_EXTERNAL
(
double
,
_d
)
{
_strm
;
// prevent warnings
LOW_CODE_QUALITY_VARIABLE_ALLOW
(
_strm
)
;
// prevent warnings
return
Data
(
to_string
(
_d
));
}
...
...
Journal/JournalStream.hh
View file @
a82a3715
...
...
@@ -33,9 +33,10 @@ template <class T> Key key(const T* const _pntr)
}
// Wrapper for data as text from any type, returned from the Journal::define()
struct
Data
{
String
str
;
// reference string
enum
class
Type
{
INTERNAL
,
...
...
@@ -44,7 +45,6 @@ struct Data
};
Type
type
=
Type
::
INTERNAL
;
// data type
String
str
;
// reference string
Data
()
{}
// opaque data
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment