Fix warnings.
GitOrigin-RevId: d8ae75999b183f143fee5d8961174afcad601f58
This commit is contained in:
parent
aa146b77b8
commit
386d18e8c4
@ -164,7 +164,7 @@ void ResourceManager::add_node(NodeId node_id, int8 priority) {
|
|||||||
to_xload_.insert(it, std::make_pair(priority, node_id));
|
to_xload_.insert(it, std::make_pair(priority, node_id));
|
||||||
} else {
|
} else {
|
||||||
auto it = std::find_if(to_xload_.begin(), to_xload_.end(), [&](auto &x) { return x.first < -priority; });
|
auto it = std::find_if(to_xload_.begin(), to_xload_.end(), [&](auto &x) { return x.first < -priority; });
|
||||||
to_xload_.insert(it, std::make_pair(-priority, node_id));
|
to_xload_.insert(it, std::make_pair(narrow_cast<int8>(-priority), node_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool ResourceManager::remove_node(NodeId node_id) {
|
bool ResourceManager::remove_node(NodeId node_id) {
|
||||||
|
@ -50,7 +50,7 @@ string base64_encode(Slice input) {
|
|||||||
static unsigned char char_to_value[256];
|
static unsigned char char_to_value[256];
|
||||||
static void init_base64_table() {
|
static void init_base64_table() {
|
||||||
static bool is_inited = []() {
|
static bool is_inited = []() {
|
||||||
std::fill(std::begin(char_to_value), std::end(char_to_value), 64);
|
std::fill(std::begin(char_to_value), std::end(char_to_value), static_cast<unsigned char>(64));
|
||||||
for (unsigned char i = 0; i < 64; i++) {
|
for (unsigned char i = 0; i < 64; i++) {
|
||||||
char_to_value[static_cast<size_t>(symbols64[i])] = i;
|
char_to_value[static_cast<size_t>(symbols64[i])] = i;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user