Skip to content

Commit 7d82b14

Browse files
committed
We are static-casting to U, so we really have no reason to use references. However, if this comes up again, try applying -ffloat-store to the target executable, per open-source-parsers#90
1 parent 2bc6137 commit 7d82b14

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/test_lib_json/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ ADD_EXECUTABLE( jsoncpp_test
1111

1212
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib)
1313

14+
# another way to solve issue #90
15+
#set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store)
16+
1417
# Run unit tests in post-build
1518
# (default cmake workflow hides away the test result into a file, resulting in poor dev workflow?!?)
1619
IF(JSONCPP_WITH_POST_BUILD_UNITTEST)

src/test_lib_json/jsontest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class Runner {
178178

179179
template <typename T, typename U>
180180
TestResult& checkEqual(TestResult& result,
181-
const T& expected,
182-
const U& actual,
181+
T expected,
182+
U actual,
183183
const char* file,
184184
unsigned int line,
185185
const char* expr) {

0 commit comments

Comments
 (0)