From e710119f2b078395b3b845acde878435189cc79a Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 27 Nov 2023 16:44:05 -0400 Subject: [PATCH] building --- src/nanoarrow/nanoarrow_testing.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nanoarrow/nanoarrow_testing.hpp b/src/nanoarrow/nanoarrow_testing.hpp index 59b6df29e..9f4effff0 100644 --- a/src/nanoarrow/nanoarrow_testing.hpp +++ b/src/nanoarrow/nanoarrow_testing.hpp @@ -1071,12 +1071,12 @@ class TestingJSONReader { template ArrowErrorCode SetBufferInt(const json& value, ArrowBuffer* buffer, ArrowError* error) { - // NANOARROW_RETURN_NOT_OK() interacts poorly with multiple template args - using SetItem = SetBufferIntItem; NANOARROW_RETURN_NOT_OK(Check(value.is_array(), error, "int buffer must be array")); for (const auto& item : value) { - NANOARROW_RETURN_NOT_OK(SetItem(item, buffer, error)); + // NANOARROW_RETURN_NOT_OK() interacts poorly with multiple template args + ArrowErrorCode result = SetBufferIntItem(item, buffer, error); + NANOARROW_RETURN_NOT_OK(result); } return NANOARROW_OK; @@ -1105,7 +1105,7 @@ class TestingJSONReader { NANOARROW_RETURN_NOT_OK(Check(item_int >= std::numeric_limits::lowest() && item_int <= std::numeric_limits::max(), - error, "integer buffer item outside type limits")) + error, "integer buffer item outside type limits")); T buffer_value = item_int; NANOARROW_RETURN_NOT_OK_WITH_ERROR( @@ -1176,7 +1176,7 @@ class TestingJSONReader { char* end_ptr; uint8_t byte = std::strtoul(byte_hex.data(), &end_ptr, 16); NANOARROW_RETURN_NOT_OK(Check( - end_ptr != (byte_hex.data() == 2), error, + end_ptr == (byte_hex.data() + 2), error, "binary data buffer item must contain a valid hex-encoded byte string")); data->data[data->size_bytes] = byte;