mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanups.
This commit is contained in:
@@ -15,7 +15,7 @@ protected:
|
||||
LedgerEntryType mType;
|
||||
STUInt16 mVersion;
|
||||
STObject mObject;
|
||||
LedgerEntryFormat* mFormat;
|
||||
const LedgerEntryFormat* mFormat;
|
||||
|
||||
SerializedLedgerEntry* duplicate() const { return new SerializedLedgerEntry(*this); }
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
LedgerEntryType getType() const { return mType; }
|
||||
uint16 getVersion() const { return mVersion.getValue(); }
|
||||
LedgerEntryFormat* getFormat() { return mFormat; }
|
||||
const LedgerEntryFormat* getFormat() { return mFormat; }
|
||||
|
||||
int getIFieldIndex(SOE_Field field) const { return mObject.getFieldIndex(field); }
|
||||
int getIFieldCount() const { return mObject.getCount(); }
|
||||
|
||||
@@ -102,7 +102,7 @@ std::auto_ptr<SerializedType> STObject::makeDeserializedObject(SerializedTypeID
|
||||
}
|
||||
}
|
||||
|
||||
void STObject::set(SOElement* elem)
|
||||
void STObject::set(const SOElement* elem)
|
||||
{
|
||||
mData.empty();
|
||||
mType.empty();
|
||||
@@ -120,12 +120,12 @@ void STObject::set(SOElement* elem)
|
||||
}
|
||||
}
|
||||
|
||||
STObject::STObject(SOElement* elem, const char *name) : SerializedType(name)
|
||||
STObject::STObject(const SOElement* elem, const char *name) : SerializedType(name)
|
||||
{
|
||||
set(elem);
|
||||
}
|
||||
|
||||
void STObject::set(SOElement* elem, SerializerIterator& sit)
|
||||
void STObject::set(const SOElement* elem, SerializerIterator& sit)
|
||||
{
|
||||
mData.empty();
|
||||
mType.empty();
|
||||
@@ -167,7 +167,8 @@ void STObject::set(SOElement* elem, SerializerIterator& sit)
|
||||
}
|
||||
}
|
||||
|
||||
STObject::STObject(SOElement* elem, SerializerIterator& sit, const char *name) : SerializedType(name), mFlagIdx(-1)
|
||||
STObject::STObject(const SOElement* elem, SerializerIterator& sit, const char *name)
|
||||
: SerializedType(name), mFlagIdx(-1)
|
||||
{
|
||||
set(elem, sit);
|
||||
}
|
||||
@@ -244,7 +245,7 @@ bool STObject::isEquivalent(const SerializedType& t) const
|
||||
int STObject::getFieldIndex(SOE_Field field) const
|
||||
{
|
||||
int i = 0;
|
||||
for (std::vector<SOElement*>::const_iterator it = mType.begin(), end = mType.end(); it != end; ++it, ++i)
|
||||
for (std::vector<const SOElement*>::const_iterator it = mType.begin(), end = mType.end(); it != end; ++it, ++i)
|
||||
if ((*it)->e_field == field) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -103,18 +103,18 @@ class STObject : public SerializedType
|
||||
protected:
|
||||
int mFlagIdx; // the offset to the flags object, -1 if none
|
||||
boost::ptr_vector<SerializedType> mData;
|
||||
std::vector<SOElement*> mType;
|
||||
std::vector<const SOElement*> mType;
|
||||
|
||||
STObject* duplicate() const { return new STObject(*this); }
|
||||
|
||||
public:
|
||||
STObject(const char *n = NULL) : SerializedType(n), mFlagIdx(-1) { ; }
|
||||
STObject(SOElement *t, const char *n = NULL);
|
||||
STObject(SOElement *t, SerializerIterator& u, const char *n = NULL);
|
||||
STObject(const SOElement *t, const char *n = NULL);
|
||||
STObject(const SOElement *t, SerializerIterator& u, const char *n = NULL);
|
||||
virtual ~STObject() { ; }
|
||||
|
||||
void set(SOElement *t);
|
||||
void set(SOElement *t, SerializerIterator& u);
|
||||
void set(const SOElement* t);
|
||||
void set(const SOElement* t, SerializerIterator& u);
|
||||
|
||||
int getLength() const;
|
||||
virtual SerializedTypeID getSType() const { return STI_OBJECT; }
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "Ledger.h"
|
||||
#include "Ledger.h"
|
||||
#include "Currency.h"
|
||||
#include "SerializedTransaction.h"
|
||||
#include "SerializedLedger.h"
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@ public:
|
||||
|
||||
class CAutoBN_CTX
|
||||
{
|
||||
private:
|
||||
CAutoBN_CTX(const CAutoBN_CTX&); // no implementation
|
||||
CAutoBN_CTX& operator=(const CAutoBN_CTX&); // no implementation
|
||||
|
||||
protected:
|
||||
BN_CTX* pctx;
|
||||
BN_CTX* operator=(BN_CTX* pnew) { return pctx = pnew; }
|
||||
|
||||
Reference in New Issue
Block a user