From a792f4df8e8f3e6302b30ee544ef3bf12c9dbe5d Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nicolas.pope@utu.fi>
Date: Mon, 8 Aug 2022 09:00:43 +0300
Subject: [PATCH] Fix msbuild golomb warning

---
 include/ftl/codec/golomb.hpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/ftl/codec/golomb.hpp b/include/ftl/codec/golomb.hpp
index 9c93248..aca3088 100644
--- a/include/ftl/codec/golomb.hpp
+++ b/include/ftl/codec/golomb.hpp
@@ -84,9 +84,8 @@ static inline int golombSigned(ParseContext *ctx) {
         buf >>= log;
         ctx->index += 32 - log;
 
-        if(buf & 1) buf = -(buf>>1);
-        else buf = (buf>>1);
-        return buf;
+        if(buf & 1) return -static_cast<int>(buf>>1);
+        else return buf >> 1;
     }
 }
 
-- 
GitLab