mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove dead code.
Use the protocol file to generate the STI_* constants.
This commit is contained in:
@@ -42,9 +42,6 @@ std::auto_ptr<SerializedType> STObject::makeDefaultObject(SerializedTypeID id, c
|
||||
case STI_VL:
|
||||
return std::auto_ptr<SerializedType>(new STVariableLength(name));
|
||||
|
||||
case STI_TL:
|
||||
return std::auto_ptr<SerializedType>(new STTaggedList(name));
|
||||
|
||||
case STI_ACCOUNT:
|
||||
return std::auto_ptr<SerializedType>(new STAccount(name));
|
||||
|
||||
@@ -91,9 +88,6 @@ std::auto_ptr<SerializedType> STObject::makeDeserializedObject(SerializedTypeID
|
||||
case STI_VL:
|
||||
return STVariableLength::deserialize(sit, name);
|
||||
|
||||
case STI_TL:
|
||||
return STTaggedList::deserialize(sit, name);
|
||||
|
||||
case STI_ACCOUNT:
|
||||
return STAccount::deserialize(sit, name);
|
||||
|
||||
@@ -476,17 +470,6 @@ std::vector<unsigned char> STObject::getValueFieldVL(SOE_Field field) const
|
||||
return cf->getValue();
|
||||
}
|
||||
|
||||
std::vector<TaggedListItem> STObject::getValueFieldTL(SOE_Field field) const
|
||||
{
|
||||
const SerializedType* rf = peekAtPField(field);
|
||||
if (!rf) throw std::runtime_error("Field not found");
|
||||
SerializedTypeID id = rf->getSType();
|
||||
if (id == STI_NOTPRESENT) return std::vector<TaggedListItem>(); // optional field not present
|
||||
const STTaggedList *cf = dynamic_cast<const STTaggedList *>(rf);
|
||||
if (!cf) throw std::runtime_error("Wrong field type");
|
||||
return cf->getValue();
|
||||
}
|
||||
|
||||
STAmount STObject::getValueFieldAmount(SOE_Field field) const
|
||||
{
|
||||
const SerializedType* rf = peekAtPField(field);
|
||||
@@ -620,16 +603,6 @@ void STObject::setValueFieldVL(SOE_Field field, const std::vector<unsigned char>
|
||||
cf->setValue(v);
|
||||
}
|
||||
|
||||
void STObject::setValueFieldTL(SOE_Field field, const std::vector<TaggedListItem>& v)
|
||||
{
|
||||
SerializedType* rf = getPField(field);
|
||||
if (!rf) throw std::runtime_error("Field not found");
|
||||
if (rf->getSType() == STI_NOTPRESENT) rf = makeFieldPresent(field);
|
||||
STTaggedList* cf = dynamic_cast<STTaggedList*>(rf);
|
||||
if (!cf) throw std::runtime_error("Wrong field type");
|
||||
cf->setValue(v);
|
||||
}
|
||||
|
||||
void STObject::setValueFieldAmount(SOE_Field field, const STAmount &v)
|
||||
{
|
||||
SerializedType* rf = getPField(field);
|
||||
|
||||
Reference in New Issue
Block a user