mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed compilation warnings
This commit is contained in:
4
third-party/base64/include/base64.hpp
vendored
4
third-party/base64/include/base64.hpp
vendored
@@ -18,7 +18,7 @@ namespace base64 {
|
||||
uint32_t bit_stream = 0;
|
||||
const std::string base64_chars = get_base64_chars();
|
||||
std::string encoded;
|
||||
encoded.reserve(ceil(4.0 / 3.0 * size));
|
||||
encoded.reserve(static_cast<unsigned long>(ceil(4.0 / 3.0 * size)));
|
||||
int offset = 0;
|
||||
for (unsigned int idx = 0; idx < size; idx++) {
|
||||
unsigned char c = data[idx];
|
||||
@@ -63,7 +63,7 @@ namespace base64 {
|
||||
auto num_val = base64_chars.find(c);
|
||||
if (num_val != std::string::npos) {
|
||||
offset = 18 - counter % 4 * 6;
|
||||
bit_stream += num_val << offset;
|
||||
bit_stream += static_cast<uint32_t>(num_val << offset);
|
||||
if (offset == 12) {
|
||||
decoded += static_cast<char>(bit_stream >> 16 & 0xff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user