pond3r / ggpo

Good Game, Peace Out Rollback Network SDK
MIT License
3.12k stars 361 forks source link

WIP Clang/LLVM support, fix warnings #24

Closed tyler274 closed 4 years ago

tyler274 commented 4 years ago

Includes some changes from other recent PRs (#12, #17, #21). I will remove those as I work on this some more.

Main purpose of this PR is to fix all compilation warnings for the main library (vectorwar should be mostly untouched as its a bigger task to fix) and use the *.hpp file extension for C++ header files, as this is actually C++ code.

Formatting changes made it in by mistake, will remove before suggesting this gets merged; otherwise I'd propose introducing a .clang-format file and settling on a style that can be applied automatically.

With these changes one can build the library on windows with a full llvm toolchain including linker (lld-link.exe) on top of the Microsoft provided standard library. I'd like to get libc++ support done as well, but am having some trouble building it.

Brings in WS2tcpip.h to replace deprecated functions.

pond3r commented 4 years ago

Hey, thanks for the contribution. A few requests:

  1. I created a branch for crossplatform work here: https://github.com/pond3r/ggpo/tree/dev/crossplatform. I'd prefer if all porting work was staged there before we pull to master.
  2. There are a lot of changes non-specific to the port that are a matter of style that I'd rather not pull (renaming files, putting { on a new line, etc). Could you please remove these when you restage?

Thanks!