mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 04:55:52 +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:
@@ -19,6 +19,10 @@
|
||||
|
||||
#include "../../beast/beast/unit_test/suite.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <cstdarg>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
// VFALCO TODO Replace these with something more robust and without macros.
|
||||
@@ -262,16 +266,16 @@ bool parseUrl (const std::string& strUrl, std::string& strScheme, std::string& s
|
||||
// Quality parsing
|
||||
// - integers as is.
|
||||
// - floats multiplied by a billion
|
||||
bool parseQuality (const std::string& strSource, beast::uint32& uQuality)
|
||||
bool parseQuality (const std::string& strSource, std::uint32_t& uQuality)
|
||||
{
|
||||
uQuality = beast::lexicalCast <beast::uint32> (strSource);
|
||||
uQuality = beast::lexicalCast <std::uint32_t> (strSource);
|
||||
|
||||
if (!uQuality)
|
||||
{
|
||||
float fQuality = beast::lexicalCast <float> (strSource);
|
||||
|
||||
if (fQuality)
|
||||
uQuality = (beast::uint32) (QUALITY_ONE * fQuality);
|
||||
uQuality = (std::uint32_t) (QUALITY_ONE * fQuality);
|
||||
}
|
||||
|
||||
return !!uQuality;
|
||||
|
||||
Reference in New Issue
Block a user