Even more warning fixes

fix-osga-rotate-wildly
AnyOldName3 9 months ago
parent 818a99a870
commit 1aff88e6a3

@ -87,7 +87,7 @@ namespace MWDialogue
// some keywords might be longer variations of other keywords, so we definitely need a list of // some keywords might be longer variations of other keywords, so we definitely need a list of
// candidates the first element in the pair is length of the match, i.e. depth from the first character // candidates the first element in the pair is length of the match, i.e. depth from the first character
// on // on
std::vector<typename std::pair<int, typename Entry::childen_t::const_iterator>> candidates; std::vector<typename std::pair<std::ptrdiff_t, typename Entry::childen_t::const_iterator>> candidates;
while ((j + 1) != end) while ((j + 1) != end)
{ {

@ -36,7 +36,7 @@ namespace
(result.emplace_back(makeString(args)), ...); (result.emplace_back(makeString(args)), ...);
for (int i = 1; i <= std::numeric_limits<char>::max(); ++i) for (int i = 1; i <= std::numeric_limits<char>::max(); ++i)
if (i != '&' && i != '"' && i != ' ' && i != '\n') if (i != '&' && i != '"' && i != ' ' && i != '\n')
result.push_back(std::string(1, i)); result.push_back(std::string(1, static_cast<char>(i)));
return result; return result;
} }

@ -151,7 +151,7 @@ namespace
const std::int64_t value = 1099511627776; const std::int64_t value = 1099511627776;
EXPECT_EQ(execute(*mDb, insert, value), 1); EXPECT_EQ(execute(*mDb, insert, value), 1);
Statement select(*mDb, GetAll("ints")); Statement select(*mDb, GetAll("ints"));
std::vector<std::tuple<int>> result; std::vector<std::tuple<std::int64_t>> result;
request(*mDb, select, std::back_inserter(result), std::numeric_limits<std::size_t>::max()); request(*mDb, select, std::back_inserter(result), std::numeric_limits<std::size_t>::max());
EXPECT_THAT(result, ElementsAre(std::tuple(value))); EXPECT_THAT(result, ElementsAre(std::tuple(value)));
} }
@ -205,7 +205,7 @@ namespace
const std::int64_t value = 1099511627776; const std::int64_t value = 1099511627776;
EXPECT_EQ(execute(*mDb, insert, value), 1); EXPECT_EQ(execute(*mDb, insert, value), 1);
Statement select(*mDb, GetExact<std::int64_t>("ints")); Statement select(*mDb, GetExact<std::int64_t>("ints"));
std::vector<std::tuple<int>> result; std::vector<std::tuple<std::int64_t>> result;
request(*mDb, select, std::back_inserter(result), std::numeric_limits<std::size_t>::max(), value); request(*mDb, select, std::back_inserter(result), std::numeric_limits<std::size_t>::max(), value);
EXPECT_THAT(result, ElementsAre(std::tuple(value))); EXPECT_THAT(result, ElementsAre(std::tuple(value)));
} }

@ -47,7 +47,7 @@ namespace
{ {
std::string input; std::string input;
for (int c = 1; c <= std::numeric_limits<char>::max(); ++c) for (int c = 1; c <= std::numeric_limits<char>::max(); ++c)
input.push_back(c); input.push_back(static_cast<char>(c));
Utf8Encoder encoder(FromType::CP437); Utf8Encoder encoder(FromType::CP437);
const std::string_view result = encoder.getUtf8(input); const std::string_view result = encoder.getUtf8(input);
EXPECT_EQ(result.data(), input.data()); EXPECT_EQ(result.data(), input.data());
@ -99,7 +99,7 @@ namespace
{ {
std::string input; std::string input;
for (int c = 1; c <= std::numeric_limits<char>::max(); ++c) for (int c = 1; c <= std::numeric_limits<char>::max(); ++c)
input.push_back(c); input.push_back(static_cast<char>(c));
Utf8Encoder encoder(FromType::CP437); Utf8Encoder encoder(FromType::CP437);
const std::string_view result = encoder.getLegacyEnc(input); const std::string_view result = encoder.getLegacyEnc(input);
EXPECT_EQ(result.data(), input.data()); EXPECT_EQ(result.data(), input.data());

Loading…
Cancel
Save