mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-29 18:10:12 +00:00
beast cleanup and tidying:
* Replace custom types with C++11 <cstdint> types * Fix sqlite integer intos and uses * Fix String implicit integer constructors * Escape the enclosing namespace in sqdb * Replace contract checks with assert * Make many header files compile independently * Remove the dependence on beast_core.h in many places * Remove unused or obsolete classes and functions * Remove unused or obsolete macros * Remove unused network functions and files * Remove unused or obsolete classes: - ChildProcess - HighResolutionTimer - InterProcessLock - Throw - TrackedMutex - UntrackedMutex - XmlDocument - XmlElement
This commit is contained in:
@@ -426,7 +426,7 @@ bool STObject::isEquivalent (const SerializedType& t) const
|
||||
return (it1 == end1) && (it2 == end2);
|
||||
}
|
||||
|
||||
uint256 STObject::getHash (beast::uint32 prefix) const
|
||||
uint256 STObject::getHash (std::uint32_t prefix) const
|
||||
{
|
||||
Serializer s;
|
||||
s.add32 (prefix);
|
||||
@@ -434,7 +434,7 @@ uint256 STObject::getHash (beast::uint32 prefix) const
|
||||
return s.getSHA512Half ();
|
||||
}
|
||||
|
||||
uint256 STObject::getSigningHash (beast::uint32 prefix) const
|
||||
uint256 STObject::getSigningHash (std::uint32_t prefix) const
|
||||
{
|
||||
Serializer s;
|
||||
s.add32 (prefix);
|
||||
@@ -536,7 +536,7 @@ STObject& STObject::peekFieldObject (SField::ref field)
|
||||
return *cf;
|
||||
}
|
||||
|
||||
bool STObject::setFlag (beast::uint32 f)
|
||||
bool STObject::setFlag (std::uint32_t f)
|
||||
{
|
||||
STUInt32* t = dynamic_cast<STUInt32*> (getPField (sfFlags, true));
|
||||
|
||||
@@ -547,7 +547,7 @@ bool STObject::setFlag (beast::uint32 f)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool STObject::clearFlag (beast::uint32 f)
|
||||
bool STObject::clearFlag (std::uint32_t f)
|
||||
{
|
||||
STUInt32* t = dynamic_cast<STUInt32*> (getPField (sfFlags));
|
||||
|
||||
@@ -558,12 +558,12 @@ bool STObject::clearFlag (beast::uint32 f)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool STObject::isFlag (beast::uint32 f)
|
||||
bool STObject::isFlag (std::uint32_t f)
|
||||
{
|
||||
return (getFlags () & f) == f;
|
||||
}
|
||||
|
||||
beast::uint32 STObject::getFlags (void) const
|
||||
std::uint32_t STObject::getFlags (void) const
|
||||
{
|
||||
const STUInt32* t = dynamic_cast<const STUInt32*> (peekAtPField (sfFlags));
|
||||
|
||||
@@ -651,7 +651,7 @@ unsigned char STObject::getFieldU8 (SField::ref field) const
|
||||
return cf->getValue ();
|
||||
}
|
||||
|
||||
beast::uint16 STObject::getFieldU16 (SField::ref field) const
|
||||
std::uint16_t STObject::getFieldU16 (SField::ref field) const
|
||||
{
|
||||
const SerializedType* rf = peekAtPField (field);
|
||||
|
||||
@@ -668,7 +668,7 @@ beast::uint16 STObject::getFieldU16 (SField::ref field) const
|
||||
return cf->getValue ();
|
||||
}
|
||||
|
||||
beast::uint32 STObject::getFieldU32 (SField::ref field) const
|
||||
std::uint32_t STObject::getFieldU32 (SField::ref field) const
|
||||
{
|
||||
const SerializedType* rf = peekAtPField (field);
|
||||
|
||||
@@ -685,7 +685,7 @@ beast::uint32 STObject::getFieldU32 (SField::ref field) const
|
||||
return cf->getValue ();
|
||||
}
|
||||
|
||||
beast::uint64 STObject::getFieldU64 (SField::ref field) const
|
||||
std::uint64_t STObject::getFieldU64 (SField::ref field) const
|
||||
{
|
||||
const SerializedType* rf = peekAtPField (field);
|
||||
|
||||
@@ -904,7 +904,7 @@ void STObject::setFieldU8 (SField::ref field, unsigned char v)
|
||||
cf->setValue (v);
|
||||
}
|
||||
|
||||
void STObject::setFieldU16 (SField::ref field, beast::uint16 v)
|
||||
void STObject::setFieldU16 (SField::ref field, std::uint16_t v)
|
||||
{
|
||||
SerializedType* rf = getPField (field, true);
|
||||
|
||||
@@ -919,7 +919,7 @@ void STObject::setFieldU16 (SField::ref field, beast::uint16 v)
|
||||
cf->setValue (v);
|
||||
}
|
||||
|
||||
void STObject::setFieldU32 (SField::ref field, beast::uint32 v)
|
||||
void STObject::setFieldU32 (SField::ref field, std::uint32_t v)
|
||||
{
|
||||
SerializedType* rf = getPField (field, true);
|
||||
|
||||
@@ -934,7 +934,7 @@ void STObject::setFieldU32 (SField::ref field, beast::uint32 v)
|
||||
cf->setValue (v);
|
||||
}
|
||||
|
||||
void STObject::setFieldU64 (SField::ref field, beast::uint64 v)
|
||||
void STObject::setFieldU64 (SField::ref field, std::uint64_t v)
|
||||
{
|
||||
SerializedType* rf = getPField (field, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user