mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Neaten this up a bit.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
#include "FieldNames.h"
|
#include "FieldNames.h"
|
||||||
|
|
||||||
#define FIELD(name, type, index) { sf##name, #name, STI_##type, index },
|
#define FIELD(name, type, index) { sf##name, #name, STI_##type, index },
|
||||||
#define TYPE(type, index)
|
#define TYPE(name, type, index)
|
||||||
|
|
||||||
FieldName FieldNames[]=
|
FieldName FieldNames[]=
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,24 +2,26 @@
|
|||||||
// appropriate #define statements.
|
// appropriate #define statements.
|
||||||
|
|
||||||
// types (common)
|
// types (common)
|
||||||
TYPE(UINT32, 1)
|
TYPE("Int32", UINT32, 1)
|
||||||
TYPE(UINT64, 2)
|
TYPE("Int64", UINT64, 2)
|
||||||
TYPE(HASH128, 3)
|
TYPE("Hash128", HASH128, 3)
|
||||||
TYPE(HASH256, 4)
|
TYPE("Hash256", HASH256, 4)
|
||||||
// 5 is reserved
|
// 5 is reserved
|
||||||
TYPE(AMOUNT, 6)
|
TYPE("Amount", AMOUNT, 6)
|
||||||
TYPE(VL, 7)
|
TYPE("VariableLength", VL, 7)
|
||||||
TYPE(ACCOUNT, 8)
|
TYPE("Account", ACCOUNT, 8)
|
||||||
// 9-13 are reserved
|
// 9-13 are reserved
|
||||||
TYPE(OBJECT, 14)
|
TYPE("Object", OBJECT, 14)
|
||||||
TYPE(ARRAY, 15)
|
TYPE("Array", ARRAY, 15)
|
||||||
|
|
||||||
// types (uncommon)
|
// types (uncommon)
|
||||||
TYPE(UINT8, 16)
|
TYPE("Int8", UINT8, 16)
|
||||||
TYPE(UINT16, 17)
|
TYPE("Int16", UINT16, 17)
|
||||||
TYPE(HASH160, 18)
|
TYPE("Hash160", HASH160, 18)
|
||||||
TYPE(PATHSET, 19)
|
TYPE("PathSet", PATHSET, 19)
|
||||||
TYPE(VECTOR256, 20)
|
TYPE("Vector256", VECTOR256, 20)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 8-bit integers
|
// 8-bit integers
|
||||||
FIELD(CloseResolution, UINT8, 1)
|
FIELD(CloseResolution, UINT8, 1)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ enum SOE_Field
|
|||||||
sfGeneric = 0,
|
sfGeneric = 0,
|
||||||
|
|
||||||
#define FIELD(name, type, index) sf##name,
|
#define FIELD(name, type, index) sf##name,
|
||||||
#define TYPE(name, index)
|
#define TYPE(name, type, index)
|
||||||
#include "SerializeProto.h"
|
#include "SerializeProto.h"
|
||||||
#undef FIELD
|
#undef FIELD
|
||||||
#undef TYPE
|
#undef TYPE
|
||||||
|
|||||||
Reference in New Issue
Block a user