New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix fallout from removal of ibize_platform.h #658
Conversation
|
Why was cstdint specifically added to JK2 ? |
I'm not sure why specifically The rest of the codebase uses the C |
On Windows, QDECL expands to __cdecl, which is presumably necessary. On other platforms, the __cdecl decoration does not exist, and QDECL correctly expands to nothing. Before commit 0323591, __cdecl expanded to nothing on non-Windows, due to inclusion of ibize_platform.h.
.../code/game/g_savegame.cpp: In function ‘void
EnumerateFields(const save_field_t*, const byte*, unsigned int, int)’:
.../code/game/g_savegame.cpp:512:22: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
assert(pField->iOffset < iLen);
^
iLen is a non-negative amount of memory, so size_t is a more
appropriate type than int.
lessstr::operator() in tokenizer.h calls strcmp(), and CBlockMember::WriteDataPointer<T> calls memcpy(). These were presumably declared via some other header in older OpenJK or in older g++.
|
The other two commits here are simple fixes for compiler warnings ( I've dropped the #651 part from this pull request, since removing the use of |
fix fallout from removal of ibize_platform.h
After commit 0323591 removed the inclusion of ibize_platform.h, I get compiler errors in codeJK2 on Linux (gcc).
One of the commits here should also fix #651.