Skip to content

Commit

Permalink
#16: tmp CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Apr 24, 2024
1 parent 02da9f5 commit 0b875f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ci/build-and-test-bindings.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM pierrpebay/vt-tv:master AS build

COPY . /opt/src/vt-tv
RUN mkdir -p /opt/build/vt-tv
RUN mkdir -p /opt/build/vt-tv/test_output

# setup environment
ENV VTTV_VTK_DIR=/opt/build/vtk-build
Expand Down
11 changes: 7 additions & 4 deletions src/vt-tv/utility/qoi_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ namespace nlohmann
}

static void from_json(const json &j, VariantTypes &value) {
if (j.is_number_unsigned()) {
value = j.get<ElementIDType>();
} else if (j.is_number_integer()) {
value = j.get<int>();
if (j.is_number_integer()) {
auto number = j.get<int64_t>();
if (number >= std::numeric_limits<int>::min() && number <= std::numeric_limits<int>::max()) {
value = static_cast<int>(number);
} else {
value = static_cast<ElementIDType>(number);
}
} else if (j.is_number_float()) {
value = j.get<double>();
} else if (j.is_string()) {
Expand Down

0 comments on commit 0b875f1

Please sign in to comment.