From df7248039553b3ebd338380c3ef0428b0e046e79 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Aug 2020 09:38:45 -0400 Subject: common: Make use of [[nodiscard]] where applicable Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions. --- src/common/memory_detect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/memory_detect.h') diff --git a/src/common/memory_detect.h b/src/common/memory_detect.h index a73c0f3f4..0f73751c8 100644 --- a/src/common/memory_detect.h +++ b/src/common/memory_detect.h @@ -17,6 +17,6 @@ struct MemoryInfo { * Gets the memory info of the host system * @return Reference to a MemoryInfo struct with the physical and swap memory sizes in bytes */ -const MemoryInfo& GetMemInfo(); +[[nodiscard]] const MemoryInfo& GetMemInfo(); } // namespace Common \ No newline at end of file -- cgit v1.2.3