Address compiler warnings #10
This commit is contained in:
@ -833,7 +833,7 @@ public:
|
||||
#ifdef _WIN32
|
||||
this->set_compat_client_id(handle, client_id);
|
||||
#else
|
||||
this->set_client_id(handle, client_id);
|
||||
this->set_client_id(static_cast<native_handle>(handle), client_id);
|
||||
#endif
|
||||
response.encode(handle);
|
||||
}
|
||||
|
@ -28,8 +28,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace macaron {
|
||||
namespace Base64 {
|
||||
namespace macaron::Base64 {
|
||||
static std::string Encode(const char *data, const size_t &len) {
|
||||
static constexpr char sEncodingTable[] = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
|
||||
@ -135,7 +134,6 @@ static std::string Encode(const char *data, const size_t &len) {
|
||||
|
||||
return out;
|
||||
}
|
||||
} // namespace Base64
|
||||
} // namespace macaron
|
||||
} // namespace macaron::Base64
|
||||
|
||||
#endif /* _MACARON_BASE64_H_ */
|
||||
|
@ -143,7 +143,7 @@ template <typename t>
|
||||
template <typename t>
|
||||
[[nodiscard]] auto random_between(const t &begin, const t &end) -> t {
|
||||
srand(static_cast<unsigned int>(get_time_now()));
|
||||
return begin + rand() % ((end + 1) - begin);
|
||||
return begin + static_cast<t>(rand()) % ((end + 1) - begin);
|
||||
}
|
||||
|
||||
template <typename t>
|
||||
|
Reference in New Issue
Block a user