Skip to content

Commit

Permalink
Add some missing noexcept in BitArchiveReader
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Nov 10, 2023
1 parent b296c0b commit 6b9c042
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/bit7z/bitarchivereader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
BIT7Z_NODISCARD
static auto isHeaderEncrypted( const Bit7zLibrary& lib,
T&& inArchive,
const BitInFormat& format BIT7Z_DEFAULT_FORMAT ) -> bool {
const BitInFormat& format BIT7Z_DEFAULT_FORMAT ) noexcept -> bool {
try {
const BitArchiveReader reader{ lib, std::forward< T >( inArchive ), format };
return false;
Expand Down Expand Up @@ -205,7 +205,7 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
BIT7Z_NODISCARD
static auto isEncrypted( const Bit7zLibrary& lib,
T&& inArchive,
const BitInFormat& format BIT7Z_DEFAULT_FORMAT ) -> bool {
const BitInFormat& format BIT7Z_DEFAULT_FORMAT ) noexcept -> bool {
try {
const BitArchiveReader reader{ lib, std::forward< T >( inArchive ), format };
return reader.isEncrypted();
Expand All @@ -215,7 +215,7 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
}

private:
static auto isOpenEncryptedError( std::error_code error ) -> bool;
static auto isOpenEncryptedError( std::error_code error ) noexcept -> bool;
};

BIT7Z_DEPRECATED_TYPEDEF( BitArchiveInfo, BitArchiveReader, "Since v4.0. Please use BitArchiveReader." );
Expand Down
2 changes: 1 addition & 1 deletion src/bitarchivereader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ auto BitArchiveReader::volumesCount() const -> uint32_t {
return volumesCount.isEmpty() ? 1 : volumesCount.getUInt32();
}

auto BitArchiveReader::isOpenEncryptedError( std::error_code error ) -> bool {
auto BitArchiveReader::isOpenEncryptedError( std::error_code error ) noexcept -> bool {
static const auto encryptedError = make_error_code( OperationResult::OpenErrorEncrypted );
return error == encryptedError;
}
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operationresult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace bit7z {

auto make_error_code( OperationResult error ) -> std::error_code {
auto make_error_code( OperationResult error ) noexcept -> std::error_code {
return { static_cast< int >( error ), operation_category() };
}

Expand Down
2 changes: 1 addition & 1 deletion src/internal/operationresult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum struct OperationResult {
EmptyPassword = ( 2 * NOperationResult::kWrongPassword ) + 3,
};

auto make_error_code( OperationResult error ) -> std::error_code;
auto make_error_code( OperationResult error ) noexcept -> std::error_code;

} // namespace bit7z

Expand Down

0 comments on commit 6b9c042

Please sign in to comment.