Browse Source

Update cleanup

Kajetan Johannes Hammerle 3 months ago
parent
commit
272a10359a
3 changed files with 5 additions and 20 deletions
  1. 1 8
      CMakeLists.txt
  2. 2 10
      src/Network.c
  3. 2 2
      tasks

+ 1 - 8
CMakeLists.txt

@@ -39,13 +39,6 @@ endif()
 
 if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     include("cmake/gcc_warnings.cmake")
-    set(DEFINITIONS ${DEFINITIONS}
-        bool=_Bool
-        true=1
-        false=0
-        nullptr=0
-        static_assert=_Static_assert
-    )
 elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
     include("cmake/clang_warnings.cmake")
 endif()
@@ -69,7 +62,7 @@ target_include_directories(gaming_core SYSTEM
     PUBLIC stb
     PUBLIC glfw/include
 )
-target_link_directories(gaming_core SYSTEM
+target_link_directories(gaming_core
     PUBLIC ${CMAKE_INSTALL_PREFIX}/lib
 )
 target_sources(gaming_core PUBLIC

+ 2 - 10
src/Network.c

@@ -141,19 +141,11 @@ void writeOutPacketU32(OutPacket* out, u32 u) {
 }
 
 void writeOutPacketI8(OutPacket* out, i8 i) {
-    if(i < 0) {
-        writeOutPacketU8(out, (u8)((i32)i + (i32)128));
-    } else {
-        writeOutPacketU8(out, (u8)((u32)i + (u32)128));
-    }
+    writeOutPacketU8(out, (u8)((i32)i + (i32)128));
 }
 
 void writeOutPacketI16(OutPacket* out, i16 i) {
-    if(i < 0) {
-        writeOutPacketU16(out, (u16)((i32)i + (i32)32768));
-    } else {
-        writeOutPacketU16(out, (u16)((u32)i + (u32)32768));
-    }
+    writeOutPacketU16(out, (u16)((i32)i + (i32)32768));
 }
 
 void writeOutPacketI32(OutPacket* out, i32 i) {

+ 2 - 2
tasks

@@ -184,7 +184,7 @@ if $coverage; then
             --exclude-lines-by-pattern ".*CoverageIgnore.*"
     else
         files=$(find build_debug -name *.profraw)
-        llvm-profdata-16 merge -sparse $files -o build_debug/default.profdata
-        llvm-cov-16 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="(test/)|(WindowManager.c)" -line-coverage-lt=100
+        llvm-profdata-17 merge -sparse $files -o build_debug/default.profdata
+        llvm-cov-17 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="(test/)|(WindowManager.c)" -line-coverage-lt=100
     fi
 fi