mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 00:15:51 +00:00
Cleanup and log, no semantic changes. SerializedType::operator=(const SerializedType &)
This commit is contained in:
@@ -19,6 +19,15 @@ DECLARE_INSTANCE(SerializedValue);
|
|||||||
STAmount saZero(CURRENCY_ONE, ACCOUNT_ONE, 0);
|
STAmount saZero(CURRENCY_ONE, ACCOUNT_ONE, 0);
|
||||||
STAmount saOne(CURRENCY_ONE, ACCOUNT_ONE, 1);
|
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() {
|
void STPathSet::printDebug() {
|
||||||
for (int i = 0; i < value.size(); i++) {
|
for (int i = 0; i < value.size(); i++) {
|
||||||
std::cout << i << ": ";
|
std::cout << i << ": ";
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "Serializer.h"
|
#include "Serializer.h"
|
||||||
#include "FieldNames.h"
|
#include "FieldNames.h"
|
||||||
#include "InstanceCounter.h"
|
#include "InstanceCounter.h"
|
||||||
|
#include "Log.h"
|
||||||
|
|
||||||
enum PathFlags
|
enum PathFlags
|
||||||
{
|
{
|
||||||
@@ -68,8 +69,8 @@ public:
|
|||||||
|
|
||||||
void addFieldID(Serializer& s) const { s.addFieldID(fName->fieldType, fName->fieldValue); }
|
void addFieldID(Serializer& s) const { s.addFieldID(fName->fieldType, fName->fieldValue); }
|
||||||
|
|
||||||
SerializedType& operator=(const SerializedType& t)
|
SerializedType& operator=(const SerializedType& t);
|
||||||
{ if (!fName->fieldCode) fName = t.fName; return *this; }
|
|
||||||
bool operator==(const SerializedType& t) const
|
bool operator==(const SerializedType& t) const
|
||||||
{ return (getSType() == t.getSType()) && isEquivalent(t); }
|
{ return (getSType() == t.getSType()) && isEquivalent(t); }
|
||||||
bool operator!=(const SerializedType& t) const
|
bool operator!=(const SerializedType& t) const
|
||||||
|
|||||||
Reference in New Issue
Block a user