mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix clang warnings
This commit is contained in:
committed by
Vinnie Falco
parent
9bf1a76e91
commit
cd30e552a7
@@ -195,14 +195,19 @@ Data::pointer Interpreter::getUint160Data ()
|
||||
|
||||
bool Interpreter::jumpTo (int offset)
|
||||
{
|
||||
mInstructionPointer += offset;
|
||||
|
||||
if ( (mInstructionPointer < 0) || (mInstructionPointer > mCode->size ()) )
|
||||
if (offset < 0)
|
||||
{
|
||||
mInstructionPointer -= offset;
|
||||
return (false);
|
||||
if (-offset > mInstructionPointer)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset > mCode->size () ||
|
||||
mInstructionPointer > mCode->size () - offset)
|
||||
return false;
|
||||
}
|
||||
|
||||
mInstructionPointer += offset;
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
@@ -891,7 +891,7 @@ public:
|
||||
// PropertyStream
|
||||
//
|
||||
|
||||
void onWrite (PropertyStream& stream)
|
||||
void onWrite (PropertyStream::Map& stream)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -235,6 +235,13 @@ void SerializedTransaction::setSourceAccount (const RippleAddress& naSource)
|
||||
setFieldAccount (sfAccount, naSource);
|
||||
}
|
||||
|
||||
Json::Value SerializedTransaction::getJson (int) const
|
||||
{
|
||||
Json::Value ret = STObject::getJson (0);
|
||||
ret["hash"] = getTransactionID ().GetHex ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Json::Value SerializedTransaction::getJson (int options, bool binary) const
|
||||
{
|
||||
if (binary)
|
||||
@@ -245,10 +252,7 @@ Json::Value SerializedTransaction::getJson (int options, bool binary) const
|
||||
ret["hash"] = getTransactionID ().GetHex ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Json::Value ret = STObject::getJson (0);
|
||||
ret["hash"] = getTransactionID ().GetHex ();
|
||||
return ret;
|
||||
return getJson(options);
|
||||
}
|
||||
|
||||
std::string SerializedTransaction::getSQLValueHeader ()
|
||||
|
||||
@@ -101,7 +101,8 @@ public:
|
||||
|
||||
uint256 getTransactionID () const;
|
||||
|
||||
virtual Json::Value getJson (int options, bool binary = false) const;
|
||||
virtual Json::Value getJson (int options) const;
|
||||
virtual Json::Value getJson (int options, bool binary) const;
|
||||
|
||||
void sign (const RippleAddress & naAccountPrivate);
|
||||
bool checkSign (const RippleAddress & naAccountPublic) const;
|
||||
|
||||
@@ -48,11 +48,9 @@ static int s_nodeStoreDBCount = NUMBER (s_nodeStoreDBInit);
|
||||
class SqliteBackend : public NodeStore::Backend
|
||||
{
|
||||
public:
|
||||
SqliteBackend (size_t keyBytes, std::string const& path, NodeStore::Scheduler& scheduler)
|
||||
: m_keyBytes (keyBytes)
|
||||
, m_name (path)
|
||||
explicit SqliteBackend (std::string const& path)
|
||||
: m_name (path)
|
||||
, m_db (new DatabaseCon(path, s_nodeStoreDBInit, s_nodeStoreDBCount))
|
||||
, m_scheduler (scheduler)
|
||||
{
|
||||
String s;
|
||||
|
||||
@@ -218,10 +216,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
size_t const m_keyBytes;
|
||||
std::string const m_name;
|
||||
std::unique_ptr <DatabaseCon> m_db;
|
||||
NodeStore::Scheduler& m_scheduler;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -235,11 +231,10 @@ public:
|
||||
}
|
||||
|
||||
std::unique_ptr <NodeStore::Backend> createInstance (
|
||||
size_t keyBytes, NodeStore::Parameters const& keyValues,
|
||||
NodeStore::Scheduler& scheduler, Journal)
|
||||
size_t, NodeStore::Parameters const& keyValues,
|
||||
NodeStore::Scheduler&, Journal)
|
||||
{
|
||||
return std::make_unique <SqliteBackend> (
|
||||
keyBytes, keyValues ["path"].toStdString (), scheduler);
|
||||
return std::make_unique <SqliteBackend> (keyValues ["path"].toStdString ());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -437,11 +437,11 @@ public:
|
||||
{
|
||||
int iDomains = 0;
|
||||
int iNodes = 0;
|
||||
Database* db = getApp().getWalletDB ()->getDB ();
|
||||
|
||||
#if 0
|
||||
{
|
||||
DeprecatedScopedLock sl (getApp().getWalletDB ()->getDBLock ());
|
||||
Database* db = getApp().getWalletDB ()->getDB ();
|
||||
|
||||
if (db->executeSQL (str (boost::format ("SELECT COUNT(*) AS Count FROM SeedDomains WHERE Source='%s' OR Source='%c';") % vsManual % vsValidator)) && db->startIterRows ())
|
||||
iDomains = db->getInt ("Count");
|
||||
|
||||
Reference in New Issue
Block a user