explicit down cast (#46)

Newer clang does not allow down cast with brace initialization. Replace them with C-style cast.
This commit is contained in:
胡玮文
2025-03-03 08:44:22 +08:00
committed by GitHub
parent c9f9511594
commit 34612f3b4f
5 changed files with 6 additions and 6 deletions

View File

@@ -12,8 +12,8 @@ static monitor::CountRecorder num_update_channels_total{"storage_client.num_upda
UpdateChannelAllocator::UpdateChannelAllocator(size_t numChannels)
: numChannels_(std::min(kMaxNumChannels, numChannels)) {
std::scoped_lock lock(availableChannelMutex_);
for (uint32_t id = numChannels_; id > 0; id--) {
availableChannelIds_.push(ChannelId{id});
for (auto id = (ChannelId)numChannels_; id > 0; id--) {
availableChannelIds_.push(id);
num_update_channels_total.addSample(1);
}
}