Skip to content

Commit

Permalink
Fix clang-tidy readability-make-member-function-const in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
randombit committed Jul 28, 2023
1 parent 233501b commit b681203
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib/pbkdf/pwdhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class BOTAN_PUBLIC_API(2, 8) PasswordHash {
* This function is const, but is not thread safe. Different threads should
* either use unique objects, or serialize all access.
*/
void hash(std::span<uint8_t> out, std::string_view password, std::span<const uint8_t> salt) {
void hash(std::span<uint8_t> out, std::string_view password, std::span<const uint8_t> salt) const {
this->derive_key(out.data(), out.size(), password.data(), password.size(), salt.data(), salt.size());
}

Expand All @@ -98,7 +98,7 @@ class BOTAN_PUBLIC_API(2, 8) PasswordHash {
std::string_view password,
std::span<const uint8_t> salt,
std::span<const uint8_t> associated_data,
std::span<const uint8_t> key) {
std::span<const uint8_t> key) const {
this->derive_key(out.data(),
out.size(),
password.data(),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tls/tls_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class BOTAN_UNSTABLE_API Supported_Point_Formats final : public Extension {

bool empty() const override { return false; }

bool prefers_compressed() { return m_prefers_compressed; }
bool prefers_compressed() const { return m_prefers_compressed; }

private:
bool m_prefers_compressed = false;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/http_util/http_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Response final {

std::string status_message() const { return m_status_message; }

void throw_unless_ok() {
void throw_unless_ok() const {
if(status_code() != 200) {
throw HTTP_Error(status_message());
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BOTAN_TEST_API Timer final {

void stop();

bool under(std::chrono::milliseconds msec) { return (milliseconds() < msec.count()); }
bool under(std::chrono::milliseconds msec) const { return (milliseconds() < msec.count()); }

class Timer_Scope final {
public:
Expand Down

0 comments on commit b681203

Please sign in to comment.