[ox] Fix remaining implicit conversion issues
This commit is contained in:
1
deps/ox/src/ox/oc/CMakeLists.txt
vendored
1
deps/ox/src/ox/oc/CMakeLists.txt
vendored
@@ -6,6 +6,7 @@ add_library(
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(OxOrganicClaw PRIVATE -Wsign-conversion)
|
||||
target_compile_options(OxOrganicClaw PRIVATE -Wconversion)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
|
||||
4
deps/ox/src/ox/oc/read.hpp
vendored
4
deps/ox/src/ox/oc/read.hpp
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -107,7 +107,7 @@ class OrganicClawReader {
|
||||
}
|
||||
|
||||
template<typename T = void>
|
||||
constexpr void setTypeInfo(const char*, int, const Vector<String>& = {}, int = {}) noexcept {
|
||||
constexpr void setTypeInfo(const char*, int, const Vector<String>& = {}, std::size_t = {}) noexcept {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
6
deps/ox/src/ox/oc/test/tests.cpp
vendored
6
deps/ox/src/ox/oc/test/tests.cpp
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -332,7 +332,7 @@ const std::map<std::string_view, ox::Error(*)()> tests = {
|
||||
}
|
||||
case ox::PrimitiveType::String: {
|
||||
ox::Vector<char> v(rdr->stringLength(fieldName) + 1);
|
||||
oxAssert(rdr->field(fieldName, ox::SerStr(v.data(), v.size())), "Walking model failed.");
|
||||
oxAssert(rdr->field(fieldName, ox::SerStr(v.data(), static_cast<int>(v.size()))), "Walking model failed.");
|
||||
oxOutf("{}:\tstring:\t{}\n", fieldName, v.data());
|
||||
break;
|
||||
}
|
||||
@@ -362,5 +362,5 @@ int main(int argc, const char **args) {
|
||||
oxErrorf("Test {} not found", testName);
|
||||
return 1;
|
||||
}
|
||||
return test();
|
||||
return static_cast<int>(test());
|
||||
}
|
||||
|
||||
6
deps/ox/src/ox/oc/write.hpp
vendored
6
deps/ox/src/ox/oc/write.hpp
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -146,7 +146,7 @@ class OrganicClawWriter {
|
||||
|
||||
template<std::size_t L>
|
||||
Error field(const char *key, BString<L> *val) noexcept {
|
||||
return field(key, SerStr(val->data(), val->cap()));
|
||||
return field(key, SerStr(val->data(), static_cast<int>(val->cap())));
|
||||
}
|
||||
|
||||
template<std::size_t L>
|
||||
@@ -180,7 +180,7 @@ class OrganicClawWriter {
|
||||
|
||||
template<typename T = void>
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion,
|
||||
const Vector<String>& = {}, int = ModelFieldCount_v<T>) noexcept {
|
||||
const Vector<String>& = {}, std::size_t = ModelFieldCount_v<T>) noexcept {
|
||||
}
|
||||
|
||||
static constexpr auto opType() noexcept {
|
||||
|
||||
Reference in New Issue
Block a user