fixes for windows xp sp3 sdk 7.1, typedefs for non-portable types, removed variable-length stack allocated arrays in tests, fixed inconsistent timeFunction interface declaraion, replaced variable-length stack allocated array in with std::vector in PVStructure factory as it is followed immediately by further heap allocation

This commit is contained in:
jrowlandls
2011-09-16 09:04:00 +01:00
parent 9ef3a62994
commit 1abdde0c3d
9 changed files with 34 additions and 32 deletions

View File

@@ -8,6 +8,7 @@
#include <cstdlib>
#include <string>
#include <cstdio>
#include <vector>
#include <pv/pvData.h>
#include <pv/pvIntrospect.h>
#include <pv/convert.h>
@@ -150,9 +151,9 @@ namespace epics { namespace pvData {
throw std::logic_error("Number of fields must be >=0");
Structure::shared_pointer structure = const_pointer_cast<Structure>(getStructure());
FieldConstPtr fields[numberNewFields];
std::vector<FieldConstPtr> fields(numberNewFields);
for(int i=0; i<numberNewFields; i++) fields[i] = pvFields[i]->getField();
structure->appendFields(numberNewFields,fields);
structure->appendFields(numberNewFields,&fields[0]);
int origLength = pImpl->numberFields;
PVFieldPtrArray oldPVFields = pImpl->pvFields;
int numberFields = origLength + numberNewFields;