Skip to content

Commit

Permalink
Make error_code overload noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Jan 21, 2025
1 parent f268d26 commit 95874f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions include/tmp/file
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public:
/// Returns the size of this file
/// @param[out] ec Parameter for error reporting
/// @returns the size of this file, in bytes
/// @throws std::filesystem::filesystem_error if cannot get a file size
std::uintmax_t size(std::error_code& ec) const;
std::uintmax_t size(std::error_code& ec) const noexcept;

/// Reads the entire contents of this file
/// @returns A string with this file contents
Expand Down
2 changes: 1 addition & 1 deletion src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ std::uintmax_t file::size() const {
return result;
}

std::uintmax_t file::size(std::error_code& ec) const {
std::uintmax_t file::size(std::error_code& ec) const noexcept {
#ifdef _WIN32
LARGE_INTERGER size;
if (!GetFileSize(native_handle(), &size)) {
Expand Down

0 comments on commit 95874f5

Please sign in to comment.