avoid unnecessary globals
This commit is contained in:
@@ -24,25 +24,6 @@ using std::string;
|
||||
|
||||
namespace epics { namespace pvData {
|
||||
|
||||
PVFieldPtr PVStructure::nullPVField;
|
||||
PVBooleanPtr PVStructure::nullPVBoolean;
|
||||
PVBytePtr PVStructure::nullPVByte;
|
||||
PVShortPtr PVStructure::nullPVShort;
|
||||
PVIntPtr PVStructure::nullPVInt;
|
||||
PVLongPtr PVStructure::nullPVLong;
|
||||
PVUBytePtr PVStructure::nullPVUByte;
|
||||
PVUShortPtr PVStructure::nullPVUShort;
|
||||
PVUIntPtr PVStructure::nullPVUInt;
|
||||
PVULongPtr PVStructure::nullPVULong;
|
||||
PVFloatPtr PVStructure::nullPVFloat;
|
||||
PVDoublePtr PVStructure::nullPVDouble;
|
||||
PVStringPtr PVStructure::nullPVString;
|
||||
PVStructurePtr PVStructure::nullPVStructure;
|
||||
PVStructureArrayPtr PVStructure::nullPVStructureArray;
|
||||
PVUnionPtr PVStructure::nullPVUnion;
|
||||
PVUnionArrayPtr PVStructure::nullPVUnionArray;
|
||||
PVScalarArrayPtr PVStructure::nullPVScalarArray;
|
||||
|
||||
PVStructure::PVStructure(StructureConstPtr const & structurePtr)
|
||||
: PVField(structurePtr),
|
||||
structurePtr(structurePtr),
|
||||
@@ -116,9 +97,9 @@ PVFieldPtr PVStructure::getSubField(const char * fieldName) const
|
||||
PVFieldPtr PVStructure::getSubField(size_t fieldOffset) const
|
||||
{
|
||||
if(fieldOffset<=getFieldOffset()) {
|
||||
return nullPVField;
|
||||
return PVFieldPtr();
|
||||
}
|
||||
if(fieldOffset>getNextFieldOffset()) return nullPVField;
|
||||
if(fieldOffset>getNextFieldOffset()) return PVFieldPtr();
|
||||
size_t numFields = pvFields.size();
|
||||
for(size_t i=0; i<numFields; i++) {
|
||||
PVFieldPtr pvField = pvFields[i];
|
||||
|
||||
@@ -916,25 +916,6 @@ public:
|
||||
private:
|
||||
PVField *getSubFieldImpl(const char *name, bool throws = true) const;
|
||||
|
||||
static PVFieldPtr nullPVField;
|
||||
static PVBooleanPtr nullPVBoolean;
|
||||
static PVBytePtr nullPVByte;
|
||||
static PVShortPtr nullPVShort;
|
||||
static PVIntPtr nullPVInt;
|
||||
static PVLongPtr nullPVLong;
|
||||
static PVUBytePtr nullPVUByte;
|
||||
static PVUShortPtr nullPVUShort;
|
||||
static PVUIntPtr nullPVUInt;
|
||||
static PVULongPtr nullPVULong;
|
||||
static PVFloatPtr nullPVFloat;
|
||||
static PVDoublePtr nullPVDouble;
|
||||
static PVStringPtr nullPVString;
|
||||
static PVStructurePtr nullPVStructure;
|
||||
static PVStructureArrayPtr nullPVStructureArray;
|
||||
static PVUnionPtr nullPVUnion;
|
||||
static PVUnionArrayPtr nullPVUnionArray;
|
||||
static PVScalarArrayPtr nullPVScalarArray;
|
||||
|
||||
PVFieldPtrArray pvFields;
|
||||
StructureConstPtr structurePtr;
|
||||
std::string extendsStructureName;
|
||||
|
||||
Reference in New Issue
Block a user