Skip to content

Commit d4de4bf

Browse files
authored
Fix decoder benchmark. (#753)
1 parent 5b88c80 commit d4de4bf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sbe-benchmarks/src/main/cpp/SbeCarCodecBench.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
7777
car.putModel(MODEL, MODELLEN);
7878

7979
return car.encodedLength();
80-
};
80+
}
8181

8282
virtual std::uint64_t decode(const char *buffer, const std::uint64_t bufferLength)
8383
{
8484
car.wrapForDecode((char *)buffer, 0, Car::sbeBlockLength(), Car::sbeSchemaVersion(), bufferLength);
8585

86-
int64_t tmpInt;
87-
const char *tmpChar;
88-
double tmpDouble;
89-
bool tmpBool;
86+
volatile int64_t tmpInt;
87+
volatile const char *tmpChar;
88+
volatile double tmpDouble;
89+
volatile bool tmpBool;
9090

9191
tmpInt = car.serialNumber();
9292
tmpInt = car.modelYear();
@@ -139,7 +139,7 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
139139
(void)tmpBool;
140140

141141
return car.encodedLength();
142-
};
142+
}
143143

144144
private:
145145
Car car;

0 commit comments

Comments
 (0)