summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-08-05 06:10:08 -0700
committerAndreas Kling <kling@serenityos.org>2020-08-05 17:29:01 +0200
commitadb83d3adc60b54626aee9db3a9f96d1b329c04d (patch)
tree792ee6cf501630616faf980e085269313db751f6 /AK
parent3319803bd9d2a9249ac386879daa4a5016e0359e (diff)
downloadserenity-adb83d3adc60b54626aee9db3a9f96d1b329c04d.zip
AK: Decorate AK::TriState with [[nodiscard]]
TriState is another type of return code, it's value should always be observed.
Diffstat (limited to 'AK')
-rw-r--r--AK/Types.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/AK/Types.h b/AK/Types.h
index 5575be3e09..58bb08cfe5 100644
--- a/AK/Types.h
+++ b/AK/Types.h
@@ -62,8 +62,8 @@ typedef i64 int64_t;
typedef int pid_t;
#else
-# include <stdint.h>
# include <stddef.h>
+# include <stdint.h>
# include <sys/types.h>
# ifdef __ptrdiff_t
@@ -97,6 +97,8 @@ inline constexpr size_t align_up_to(const size_t value, const size_t alignment)
return (value + (alignment - 1)) & ~(alignment - 1);
}
-enum class TriState : u8 { False,
+enum class [[nodiscard]] TriState : u8 {
+ False,
True,
- Unknown };
+ Unknown
+};