Cleanup and log, no semantic changes. SerializedType::operator=(const SerializedType &)

This commit is contained in:
JoelKatz
2012-11-26 11:19:24 -08:00
parent 90ff46ff77
commit f5018b6cd1
2 changed files with 12 additions and 2 deletions

View File

@@ -19,6 +19,15 @@ DECLARE_INSTANCE(SerializedValue);
STAmount saZero(CURRENCY_ONE, ACCOUNT_ONE, 0);
STAmount saOne(CURRENCY_ONE, ACCOUNT_ONE, 1);
SerializedType& SerializedType::operator=(const SerializedType& t)
{
if ((t.fName != fName) && fName->isUseful() && t.fName->isUseful())
Log(lsWARNING) << "Caution: " << t.fName->getName() << " not replacing " << fName->getName();
if (!fName->isUseful()) fName = t.fName;
return *this;
}
void STPathSet::printDebug() {
for (int i = 0; i < value.size(); i++) {
std::cout << i << ": ";

View File

@@ -10,6 +10,7 @@
#include "Serializer.h"
#include "FieldNames.h"
#include "InstanceCounter.h"
#include "Log.h"
enum PathFlags
{
@@ -68,8 +69,8 @@ public:
void addFieldID(Serializer& s) const { s.addFieldID(fName->fieldType, fName->fieldValue); }
SerializedType& operator=(const SerializedType& t)
{ if (!fName->fieldCode) fName = t.fName; return *this; }
SerializedType& operator=(const SerializedType& t);
bool operator==(const SerializedType& t) const
{ return (getSType() == t.getSType()) && isEquivalent(t); }
bool operator!=(const SerializedType& t) const