mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove nested types SField::ref and SField::ptr...
* This silences a warning about a redundant cv-qualifier. * This makes future coding mistakes about redundant cv-qualifiers much less likely. * This makes the code easier to read.
This commit is contained in:
committed by
Tom Ritchford
parent
47482acf83
commit
100a76f0e8
@@ -104,9 +104,6 @@ field_code(int id, int index)
|
||||
class SField
|
||||
{
|
||||
public:
|
||||
typedef const SField& ref;
|
||||
typedef SField const* ptr;
|
||||
|
||||
enum
|
||||
{
|
||||
sMD_Never = 0x00,
|
||||
@@ -155,13 +152,13 @@ protected:
|
||||
|
||||
public:
|
||||
// getField will dynamically construct a new SField if necessary
|
||||
static SField::ref getField (int fieldCode);
|
||||
static SField::ref getField (std::string const& fieldName);
|
||||
static SField::ref getField (int type, int value)
|
||||
static const SField& getField (int fieldCode);
|
||||
static const SField& getField (std::string const& fieldName);
|
||||
static const SField& getField (int type, int value)
|
||||
{
|
||||
return getField (field_code (type, value));
|
||||
}
|
||||
static SField::ref getField (SerializedTypeID type, int value)
|
||||
static const SField& getField (SerializedTypeID type, int value)
|
||||
{
|
||||
return getField (field_code (type, value));
|
||||
}
|
||||
@@ -252,7 +249,7 @@ public:
|
||||
return fieldCode != f.fieldCode;
|
||||
}
|
||||
|
||||
static int compare (SField::ref f1, SField::ref f2);
|
||||
static int compare (const SField& f1, const SField& f2);
|
||||
|
||||
struct make; // public, but still an implementation detail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user