[ox] Fix remaining implicit conversion issues

This commit is contained in:
2023-06-06 23:32:23 -05:00
parent acf04665bc
commit 3fdfee33a9
50 changed files with 218 additions and 191 deletions

View File

@@ -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
@@ -17,7 +17,7 @@ Result<ClawHeader> readClawHeader(const char *buff, std::size_t buffLen) noexcep
if (!s1End) {
return OxError(1, "Could not read Claw header");
}
const auto s1Size = s1End - buff;
const auto s1Size = static_cast<std::size_t>(s1End - buff);
const String fmt(buff, s1Size);
buff += s1Size + 1;
buffLen -= s1Size + 1;
@@ -26,7 +26,7 @@ Result<ClawHeader> readClawHeader(const char *buff, std::size_t buffLen) noexcep
if (!s2End) {
return OxError(2, "Could not read Claw header");
}
const auto s2Size = s2End - buff;
const auto s2Size = static_cast<std::size_t>(s2End - buff);
const String typeName(buff, s2Size);
buff += s2Size + 1;
buffLen -= s2Size + 1;
@@ -35,7 +35,7 @@ Result<ClawHeader> readClawHeader(const char *buff, std::size_t buffLen) noexcep
if (!s3End) {
return OxError(3, "Could not read Claw header");
}
const auto s3Size = s3End - buff;
const auto s3Size = static_cast<std::size_t>(s3End - buff);
const String versionStr(buff, s3Size);
buff += s3Size + 1;
buffLen -= s3Size + 1;