Commit a82a3715 authored by Martin Marinov's avatar Martin Marinov

Fix Linux sanitized build errors in Journal

parent 0e0be2e4
......@@ -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));
}
......
......@@ -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
......
Markdown is supported
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