Skip to content

Commit

Permalink
Make SetRecordMessageLevel return void.
Browse files Browse the repository at this point in the history
SetRecordMessageLevel does not need the previous level to be restored.
  • Loading branch information
bbernhar committed Apr 7, 2022
1 parent 1049215 commit f7e4931
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/gpgmm/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ namespace gpgmm {
// Messages with equal or greater to severity will be logged.
LogSeverity gRecordEventLevel = LogSeverity::Info;

LogSeverity SetRecordMessageLevel(const LogSeverity& newLevel) {
LogSeverity oldLevel = gRecordEventLevel;
void SetRecordMessageLevel(const LogSeverity& newLevel) {
gRecordEventLevel = newLevel;
return oldLevel;
}

void RecordMessage(const LogSeverity& severity,
Expand Down
3 changes: 1 addition & 2 deletions src/gpgmm/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ namespace gpgmm {
} while (false)

// Messages of a given severity to be recorded.
// Set the new level and returns the previous level so it may be restored by the caller.
LogSeverity SetRecordMessageLevel(const LogSeverity& level);
void SetRecordMessageLevel(const LogSeverity& level);

void RecordMessage(const LogSeverity& severity,
const char* name,
Expand Down

0 comments on commit f7e4931

Please sign in to comment.