Ignore:
Timestamp:
08/18/14 10:03:36 (5 years ago)
Author:
jls17
Message:
  • moved ARZeroMemory function to Memory.cpp/.h
  • added new ARZeroMemory function which has a size parameter to replace ZeroMemory? (which is only available on windows)
  • replaced all ZeroMemory? calls with ARZeroMemory
  • fixed some gcc compiler warnings
  • now ARQualification throws AppException? instead of exception, because in the standard implementation there is no constructor to pass a message to exception class (this MSVC specific)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/work_311/lists/ARFieldList.cpp

    r549 r610  
    324324{ 
    325325        names.nameList = new ARNameType[amount]; 
    326         ZeroMemory(names.nameList, sizeof(ARNameType) * amount); 
     326        ARZeroMemory(names.nameList, sizeof(ARNameType) * amount); 
    327327 
    328328        fieldIds.internalIdList = new ARInternalId[amount]; 
    329         ZeroMemory(fieldIds.internalIdList, sizeof(ARInternalId) * amount); 
     329        ARZeroMemory(fieldIds.internalIdList, sizeof(ARInternalId) * amount); 
    330330 
    331331        fieldMaps.mappingList = new ARFieldMappingStruct[amount]; 
    332         ZeroMemory(fieldMaps.mappingList, sizeof(ARFieldMappingStruct) * amount); 
     332        ARZeroMemory(fieldMaps.mappingList, sizeof(ARFieldMappingStruct) * amount); 
    333333 
    334334        dataTypes.intList = new unsigned int[amount]; 
    335         ZeroMemory(dataTypes.intList, sizeof(unsigned int) * amount); 
     335        ARZeroMemory(dataTypes.intList, sizeof(unsigned int) * amount); 
    336336 
    337337        options.intList = new unsigned int[amount]; 
    338         ZeroMemory(options.intList, sizeof(unsigned int) * amount); 
     338        ARZeroMemory(options.intList, sizeof(unsigned int) * amount); 
    339339 
    340340        createModes.intList = new unsigned int[amount]; 
    341         ZeroMemory(createModes.intList, sizeof(unsigned int) * amount); 
     341        ARZeroMemory(createModes.intList, sizeof(unsigned int) * amount); 
    342342         
    343343        fieldOptions.intList = new unsigned int[amount]; 
    344         ZeroMemory(fieldOptions.intList, sizeof(unsigned int) * amount); 
     344        ARZeroMemory(fieldOptions.intList, sizeof(unsigned int) * amount); 
    345345 
    346346        defaultValues.valueList = new ARValueStruct[amount]; 
    347         ZeroMemory(defaultValues.valueList, sizeof(ARValueStruct) * amount); 
     347        ARZeroMemory(defaultValues.valueList, sizeof(ARValueStruct) * amount); 
    348348 
    349349        permLists.permissionList = new ARPermissionList[amount]; 
    350         ZeroMemory(permLists.permissionList, sizeof(ARPermissionList) * amount); 
     350        ARZeroMemory(permLists.permissionList, sizeof(ARPermissionList) * amount); 
    351351 
    352352        limits.fieldLimitList = new ARFieldLimitStruct[amount]; 
    353         ZeroMemory(limits.fieldLimitList, sizeof(ARFieldLimitStruct) * amount); 
     353        ARZeroMemory(limits.fieldLimitList, sizeof(ARFieldLimitStruct) * amount); 
    354354 
    355355        dInstanceLists.dInstanceList = new ARDisplayInstanceList[amount]; 
    356         ZeroMemory(dInstanceLists.dInstanceList, sizeof(ARDisplayInstanceList) * amount); 
     356        ARZeroMemory(dInstanceLists.dInstanceList, sizeof(ARDisplayInstanceList) * amount); 
    357357 
    358358        helpTexts.stringList = new char*[amount]; 
    359         ZeroMemory(helpTexts.stringList, sizeof(char*) * amount); 
     359        ARZeroMemory(helpTexts.stringList, sizeof(char*) * amount); 
    360360 
    361361        changedTimes.timestampList = new ARTimestamp[amount]; 
    362         ZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount); 
     362        ARZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount); 
    363363 
    364364        owners.nameList = new ARAccessNameType[amount]; 
    365         ZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount); 
     365        ARZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount); 
    366366 
    367367        changedUsers.nameList = new ARAccessNameType[amount]; 
    368         ZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount); 
     368        ARZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount); 
    369369 
    370370        changeDiary.stringList = new char*[amount]; 
    371         ZeroMemory(changeDiary.stringList, sizeof(char*) * amount); 
     371        ARZeroMemory(changeDiary.stringList, sizeof(char*) * amount); 
    372372 
    373373#if AR_CURRENT_API_VERSION >= AR_API_VERSION_763 
    374374        objProps.propsList = new ARPropList[amount]; 
    375         ZeroMemory(objProps.propsList, sizeof(ARPropList) * amount); 
     375        ARZeroMemory(objProps.propsList, sizeof(ARPropList) * amount); 
    376376#endif 
    377377} 
Note: See TracChangeset for help on using the changeset viewer.