Skip to content

Commit

Permalink
spdlog: cast the type to std::int32_t to avoid spdlog error
Browse files Browse the repository at this point in the history
Signed-off-by: Date Huang <[email protected]>
  • Loading branch information
tjjh89017 committed Dec 15, 2024
1 parent 5e50130 commit 1db9030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raw_disk_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class partition_storage
partition_offset += file_slice.offset;
} catch (const std::exception &e) {
SPDLOG_CRITICAL("failed to parse file_name({}) at ({}): {}",
file_name, file_index, e.what());
file_name, static_cast<std::int32_t>(file_index), e.what());
error.file(file_index);
error.ec = libtorrent::errors::parse_failed;
error.operation = libtorrent::operation_t::file_read;
Expand Down Expand Up @@ -98,7 +98,7 @@ class partition_storage
partition_offset += file_slice.offset;
} catch (const std::exception &e) {
SPDLOG_CRITICAL("failed to parse file_name({}) at ({}): {}",
file_name, file_index, e.what());
file_name, static_cast<std::int32_t>(file_index), e.what());
error.file(file_index);
error.ec = libtorrent::errors::parse_failed;
error.operation = libtorrent::operation_t::file_write;
Expand Down

0 comments on commit 1db9030

Please sign in to comment.