From 325f9d6b0849207445f28a3eece7a8c1f4bdb278 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 12 Feb 2020 20:33:41 +0100 Subject: [PATCH] Address code analysis warnings Signed-off-by: Simon Rozman --- include/stdex/idrec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stdex/idrec.h b/include/stdex/idrec.h index e2d561698..221e67af9 100644 --- a/include/stdex/idrec.h +++ b/include/stdex/idrec.h @@ -40,7 +40,7 @@ namespace stdex { /// - \c false otherwise /// template - inline bool read_id(_In_ std::istream& stream, _Out_ T_ID &id, _In_opt_ std::streamoff end = (std::streamoff)-1) + inline _Success_(return) bool read_id(_In_ std::istream& stream, _Out_ T_ID &id, _In_opt_ std::streamoff end = (std::streamoff)-1) { if (end == (std::streamoff)-1 || stream.tellg() < end) { stream.read((char*)&id, sizeof(id)); @@ -284,7 +284,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const stdex::id /// \returns The stream \p stream /// template -inline std::istream& operator >>(_In_ std::istream& stream, _Out_ stdex::idrec::record r) +inline std::istream& operator >>(_In_ std::istream& stream, _In_ stdex::idrec::record r) { // Parameter r does not need to be passed by reference. It has only one field (data), which is a reference itself already. The id field is static anyway.