mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors in order to make Journal lighter weight. The change makes a Journal cheaper to pass by value. Also add missing stream checks (e.g., calls to JLOG) to avoid text processing that ultimately will not be stored in the log.
This commit is contained in:
@@ -76,7 +76,7 @@ STArray::STArray (SerialIter& sit, SField const& f)
|
||||
|
||||
if ((type == STI_OBJECT) && (field == 1))
|
||||
{
|
||||
JLOG (debugJournal().warning) <<
|
||||
JLOG (debugJournal().warn()) <<
|
||||
"Encountered array with end of object marker";
|
||||
Throw<std::runtime_error> ("Illegal terminator in array");
|
||||
}
|
||||
@@ -85,14 +85,14 @@ STArray::STArray (SerialIter& sit, SField const& f)
|
||||
|
||||
if (fn.isInvalid ())
|
||||
{
|
||||
JLOG (debugJournal().trace) <<
|
||||
JLOG (debugJournal().trace()) <<
|
||||
"Unknown field: " << type << "/" << field;
|
||||
Throw<std::runtime_error> ("Unknown field");
|
||||
}
|
||||
|
||||
if (fn.fieldType != STI_OBJECT)
|
||||
{
|
||||
JLOG (debugJournal().trace) <<
|
||||
JLOG (debugJournal().trace()) <<
|
||||
"Array contains non-object";
|
||||
Throw<std::runtime_error> ("Non-object in array");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user