aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-10-18 06:02:09 -0400
committerJack Lloyd <[email protected]>2019-10-18 06:02:09 -0400
commit09b09d22cf7574108e834bb3e8715a38e4bad60c (patch)
tree537fd274a9743a7beb78cb66cd23fc24e86830a9 /src/lib/misc
parentca73e7a93e1b703252b70b4fe31c8c62f9cd6209 (diff)
Fix some MSVC warnings
Diffstat (limited to 'src/lib/misc')
-rw-r--r--src/lib/misc/roughtime/roughtime.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/misc/roughtime/roughtime.cpp b/src/lib/misc/roughtime/roughtime.cpp
index b8c53bdc8..435308cd0 100644
--- a/src/lib/misc/roughtime/roughtime.cpp
+++ b/src/lib/misc/roughtime/roughtime.cpp
@@ -66,7 +66,7 @@ std::map<std::string, std::vector<uint8_t>> unpack_roughtime_packet(T bytes)
std::map<std::string, std::vector<uint8_t>> tags;
for(uint32_t i=0; i<num_tags; ++i)
{
- const uint32_t end = ((i+1) == num_tags) ? bytes.size() : start_content + from_little_endian<uint32_t>(buf + 4 + i*4);
+ const size_t end = ((i+1) == num_tags) ? bytes.size() : start_content + from_little_endian<uint32_t>(buf + 4 + i*4);
if(end > bytes.size())
{ throw Roughtime::Roughtime_Error("Tag end index out of bounds"); }
if(end < start)
@@ -76,7 +76,7 @@ std::map<std::string, std::vector<uint8_t>> unpack_roughtime_packet(T bytes)
auto ret = tags.emplace(label, std::vector<uint8_t>(buf+start, buf+end));
if(!ret.second)
{ throw Roughtime::Roughtime_Error(std::string("Map has duplicated tag: ") + label); }
- start = end;
+ start = static_cast<uint32_t>(end);
}
return tags;
}