From 12f44e0f74f473519dee2b308a664409d8676f28 Mon Sep 17 00:00:00 2001 From: "Ryan@WorkStation" Date: Fri, 13 Oct 2023 12:48:31 -0400 Subject: [PATCH] change enum::DataFormat::RAW to Raw, coz stupid apple use RAW as a global varible --- armory/Hit.h | 14 +++++++------- armory/SolReader.h | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/armory/Hit.h b/armory/Hit.h index 948a1de..285c644 100644 --- a/armory/Hit.h +++ b/armory/Hit.h @@ -10,11 +10,11 @@ enum DataFormat{ - ALL = 0, - OneTrace = 1, - NoTrace = 2, - Minimum = 3, - RAW = 0x0A, + ALL = 0x00, + OneTrace = 0x01, + NoTrace = 0x02, + Minimum = 0x03, + Raw = 0x0A, }; @@ -120,7 +120,7 @@ class Hit { DPPType = dppType; ClearMemory(); - if( dataType == DataFormat::RAW){ + if( dataType == DataFormat::Raw){ data = new uint8_t[20*1024*1024]; }else{ analog_probes[0] = new int32_t[MaxTraceLenght]; @@ -241,7 +241,7 @@ class Hit { case DataFormat::OneTrace : printf("============= Type : OneTrace\n"); break; case DataFormat::NoTrace : printf("============= Type : NoTrace\n"); break; case DataFormat::Minimum : printf("============= Type : Minimum\n"); break; - case DataFormat::RAW : printf("============= Type : RAW\n"); return; break; + case DataFormat::Raw : printf("============= Type : Raw\n"); return; break; default : return; } diff --git a/armory/SolReader.h b/armory/SolReader.h index f6c336b..eab99d8 100644 --- a/armory/SolReader.h +++ b/armory/SolReader.h @@ -118,8 +118,8 @@ inline int SolReader::ReadNextBlock(int isSkip){ return -2 ; } - if( ( blockStartIdentifier & 0xF ) == DataFormat::RAW ){ - hit->SetDataType(DataFormat::RAW, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD); + if( ( blockStartIdentifier & 0xF ) == DataFormat::Raw ){ + hit->SetDataType(DataFormat::Raw, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD); } hit->dataType = blockStartIdentifier & 0xF; hit->DPPType = ((blockStartIdentifier >> 4) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD; @@ -195,7 +195,7 @@ inline int SolReader::ReadNextBlock(int isSkip){ }else{ fseek(inFile, hit->DPPType == DPPType::PHA ? 9 : 11, SEEK_CUR); } - }else if( hit->dataType == DataFormat::RAW){ + }else if( hit->dataType == DataFormat::Raw){ fread(&hit->dataSize, 8, 1, inFile); if( isSkip == 0){ fread(hit->data, hit->dataSize, 1, inFile);