mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Tidy up BuildInfo documentation
This commit is contained in:
@@ -17,12 +17,10 @@ String const& BuildInfo::getVersionString ()
|
||||
//--------------------------------------------------------------------------
|
||||
;
|
||||
|
||||
struct StaticInitializer
|
||||
struct SanityChecker
|
||||
{
|
||||
StaticInitializer ()
|
||||
SanityChecker ()
|
||||
{
|
||||
// Sanity checking on the raw text
|
||||
|
||||
Version v;
|
||||
|
||||
if (! v.parse (rawText) || v.print () != rawText)
|
||||
@@ -34,39 +32,54 @@ String const& BuildInfo::getVersionString ()
|
||||
String versionString;
|
||||
};
|
||||
|
||||
static StaticInitializer value;
|
||||
static SanityChecker value;
|
||||
|
||||
return value.versionString;
|
||||
}
|
||||
|
||||
// The protocol version we speak and prefer.
|
||||
//
|
||||
BuildInfo::Protocol const& BuildInfo::getCurrentProtocol ()
|
||||
{
|
||||
static Protocol currentProtocol (1, 2);
|
||||
static Protocol currentProtocol (
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// The protocol version we speak and prefer (edit this if necessary)
|
||||
//
|
||||
1, // major
|
||||
2 // minor
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
);
|
||||
|
||||
return currentProtocol;
|
||||
}
|
||||
|
||||
// The oldest protocol version we will accept.
|
||||
//
|
||||
BuildInfo::Protocol const& BuildInfo::getMinimumProtocol ()
|
||||
{
|
||||
static Protocol minimumProtocol (1, 2);
|
||||
static Protocol minimumProtocol (
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// The oldest protocol version we will accept. (edit this if necessary)
|
||||
//
|
||||
1, // major
|
||||
2 // minor
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
);
|
||||
|
||||
return minimumProtocol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Don't touch anything below this line
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
char const* BuildInfo::getFullVersionString ()
|
||||
{
|
||||
struct StaticInitializer
|
||||
struct PrettyPrinter
|
||||
{
|
||||
StaticInitializer ()
|
||||
PrettyPrinter ()
|
||||
{
|
||||
String s;
|
||||
|
||||
@@ -78,7 +91,7 @@ char const* BuildInfo::getFullVersionString ()
|
||||
std::string fullVersionString;
|
||||
};
|
||||
|
||||
static StaticInitializer value;
|
||||
static PrettyPrinter value;
|
||||
|
||||
return value.fullVersionString.c_str ();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ struct BuildInfo
|
||||
|
||||
The version string is formatted thusly:
|
||||
|
||||
<major> '.' <minor> '.' ['-' <suffix>]
|
||||
<major> '.' <minor> ['-' <suffix>]
|
||||
|
||||
The minor version number is always padded with leading zeroes
|
||||
to bring the number of characters up to exactly three. For example,
|
||||
@@ -52,8 +52,8 @@ struct BuildInfo
|
||||
/** The server version's components. */
|
||||
struct Version
|
||||
{
|
||||
int vmajor; // 0+
|
||||
int vminor; // 0-999
|
||||
int vmajor; // 0+
|
||||
int vminor; // 0-999
|
||||
String suffix; // Can be empty
|
||||
|
||||
//----
|
||||
|
||||
Reference in New Issue
Block a user