Commit a82a3715 authored by Martin Marinov's avatar Martin Marinov
Browse files

Fix Linux sanitized build errors in Journal

parent 0e0be2e4
...@@ -42,55 +42,55 @@ template <> Data define(Stream&, const std::nullptr_t&) ...@@ -42,55 +42,55 @@ template <> Data define(Stream&, const std::nullptr_t&)
JOURNAL_ADD_TYPE_EXTERNAL(bool, _b) JOURNAL_ADD_TYPE_EXTERNAL(bool, _b)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(_b ? "true" : "false"); return Data(_b ? "true" : "false");
} }
JOURNAL_ADD_TYPE(char, _c) JOURNAL_ADD_TYPE(char, _c)
{// TODO: (unsigned char can be output as a symbol in many cases) {// 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)); return Data(to_string(_c));
} }
JOURNAL_ADD_TYPE_EXTERNAL(unsigned char, _c) JOURNAL_ADD_TYPE_EXTERNAL(unsigned char, _c)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_c)); return Data(to_string(_c));
} }
JOURNAL_ADD_TYPE_EXTERNAL(short, _i) JOURNAL_ADD_TYPE_EXTERNAL(short, _i)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_i)); return Data(to_string(_i));
} }
JOURNAL_ADD_TYPE_EXTERNAL(unsigned short, _u) JOURNAL_ADD_TYPE_EXTERNAL(unsigned short, _u)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_u)); return Data(to_string(_u));
} }
JOURNAL_ADD_TYPE_EXTERNAL(int, _i) JOURNAL_ADD_TYPE_EXTERNAL(int, _i)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_i)); return Data(to_string(_i));
} }
JOURNAL_ADD_TYPE_EXTERNAL(unsigned int, _u) JOURNAL_ADD_TYPE_EXTERNAL(unsigned int, _u)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_u)); return Data(to_string(_u));
} }
JOURNAL_ADD_TYPE_EXTERNAL(size_t, _s) JOURNAL_ADD_TYPE_EXTERNAL(size_t, _s)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_s)); return Data(to_string(_s));
} }
JOURNAL_ADD_TYPE_EXTERNAL(float, _f) JOURNAL_ADD_TYPE_EXTERNAL(float, _f)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
Base::OStringStream os; Base::OStringStream os;
os << _f; os << _f;
...@@ -106,7 +106,7 @@ JOURNAL_ADD_TYPE_EXTERNAL(float, _f) ...@@ -106,7 +106,7 @@ JOURNAL_ADD_TYPE_EXTERNAL(float, _f)
JOURNAL_ADD_TYPE_EXTERNAL(double, _d) JOURNAL_ADD_TYPE_EXTERNAL(double, _d)
{ {
_strm; // prevent warnings LOW_CODE_QUALITY_VARIABLE_ALLOW(_strm); // prevent warnings
return Data(to_string(_d)); return Data(to_string(_d));
} }
......
...@@ -33,9 +33,10 @@ template <class T> Key key(const T* const _pntr) ...@@ -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() // Wrapper for data as text from any type, returned from the Journal::define()
struct Data struct Data
{ {
String str; // reference string
enum class Type enum class Type
{ {
INTERNAL, INTERNAL,
...@@ -44,7 +45,6 @@ struct Data ...@@ -44,7 +45,6 @@ struct Data
}; };
Type type = Type::INTERNAL; // data type Type type = Type::INTERNAL; // data type
String str; // reference string
Data() {} // opaque data Data() {} // opaque data
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment