diff options
| author | 2018-09-04 12:18:00 -0400 | |
|---|---|---|
| committer | 2018-09-04 12:18:00 -0400 | |
| commit | dda4b5e89ee428d4e872246459db308b2701eef1 (patch) | |
| tree | 2bb15d02d5da24102523bd0567d56d3d609b5cf6 /src | |
| parent | Merge pull request #1237 from degasus/optimizations (diff) | |
| parent | common/logging: Amend documentation comments (diff) | |
| download | yuzu-dda4b5e89ee428d4e872246459db308b2701eef1.tar.gz yuzu-dda4b5e89ee428d4e872246459db308b2701eef1.tar.xz yuzu-dda4b5e89ee428d4e872246459db308b2701eef1.zip | |
Merge pull request #1238 from lioncash/explicit
common/logging: Minor changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/filter.h | 4 | ||||
| -rw-r--r-- | src/common/logging/log.h | 10 | ||||
| -rw-r--r-- | src/common/logging/text_formatter.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index d5ffc5a58..f7e3b87c9 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h | |||
| @@ -19,7 +19,7 @@ namespace Log { | |||
| 19 | class Filter { | 19 | class Filter { |
| 20 | public: | 20 | public: |
| 21 | /// Initializes the filter with all classes having `default_level` as the minimum level. | 21 | /// Initializes the filter with all classes having `default_level` as the minimum level. |
| 22 | Filter(Level default_level = Level::Info); | 22 | explicit Filter(Level default_level = Level::Info); |
| 23 | 23 | ||
| 24 | /// Resets the filter so that all classes have `level` as the minimum displayed level. | 24 | /// Resets the filter so that all classes have `level` as the minimum displayed level. |
| 25 | void ResetAll(Level level); | 25 | void ResetAll(Level level); |
| @@ -49,6 +49,6 @@ public: | |||
| 49 | bool IsDebug() const; | 49 | bool IsDebug() const; |
| 50 | 50 | ||
| 51 | private: | 51 | private: |
| 52 | std::array<Level, (size_t)Class::Count> class_levels; | 52 | std::array<Level, static_cast<size_t>(Class::Count)> class_levels; |
| 53 | }; | 53 | }; |
| 54 | } // namespace Log | 54 | } // namespace Log |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index e12f47f8f..4d577524f 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -12,14 +12,14 @@ namespace Log { | |||
| 12 | /// Specifies the severity or level of detail of the log message. | 12 | /// Specifies the severity or level of detail of the log message. |
| 13 | enum class Level : u8 { | 13 | enum class Level : u8 { |
| 14 | Trace, ///< Extremely detailed and repetitive debugging information that is likely to | 14 | Trace, ///< Extremely detailed and repetitive debugging information that is likely to |
| 15 | /// pollute logs. | 15 | ///< pollute logs. |
| 16 | Debug, ///< Less detailed debugging information. | 16 | Debug, ///< Less detailed debugging information. |
| 17 | Info, ///< Status information from important points during execution. | 17 | Info, ///< Status information from important points during execution. |
| 18 | Warning, ///< Minor or potential problems found during execution of a task. | 18 | Warning, ///< Minor or potential problems found during execution of a task. |
| 19 | Error, ///< Major problems found during execution of a task that prevent it from being | 19 | Error, ///< Major problems found during execution of a task that prevent it from being |
| 20 | /// completed. | 20 | ///< completed. |
| 21 | Critical, ///< Major problems during execution that threathen the stability of the entire | 21 | Critical, ///< Major problems during execution that threaten the stability of the entire |
| 22 | /// application. | 22 | ///< application. |
| 23 | 23 | ||
| 24 | Count ///< Total number of logging levels | 24 | Count ///< Total number of logging levels |
| 25 | }; | 25 | }; |
| @@ -49,7 +49,7 @@ enum class Class : ClassType { | |||
| 49 | Kernel, ///< The HLE implementation of the CTR kernel | 49 | Kernel, ///< The HLE implementation of the CTR kernel |
| 50 | Kernel_SVC, ///< Kernel system calls | 50 | Kernel_SVC, ///< Kernel system calls |
| 51 | Service, ///< HLE implementation of system services. Each major service | 51 | Service, ///< HLE implementation of system services. Each major service |
| 52 | /// should have its own subclass. | 52 | ///< should have its own subclass. |
| 53 | Service_ACC, ///< The ACC (Accounts) service | 53 | Service_ACC, ///< The ACC (Accounts) service |
| 54 | Service_AM, ///< The AM (Applet manager) service | 54 | Service_AM, ///< The AM (Applet manager) service |
| 55 | Service_AOC, ///< The AOC (AddOn Content) service | 55 | Service_AOC, ///< The AOC (AddOn Content) service |
diff --git a/src/common/logging/text_formatter.h b/src/common/logging/text_formatter.h index 9609cec7c..b6d9e57c8 100644 --- a/src/common/logging/text_formatter.h +++ b/src/common/logging/text_formatter.h | |||
| @@ -15,6 +15,6 @@ struct Entry; | |||
| 15 | std::string FormatLogMessage(const Entry& entry); | 15 | std::string FormatLogMessage(const Entry& entry); |
| 16 | /// Formats and prints a log entry to stderr. | 16 | /// Formats and prints a log entry to stderr. |
| 17 | void PrintMessage(const Entry& entry); | 17 | void PrintMessage(const Entry& entry); |
| 18 | /// Prints the same message as `PrintMessage`, but colored acoording to the severity level. | 18 | /// Prints the same message as `PrintMessage`, but colored according to the severity level. |
| 19 | void PrintColoredMessage(const Entry& entry); | 19 | void PrintColoredMessage(const Entry& entry); |
| 20 | } // namespace Log | 20 | } // namespace Log |