-
Notifications
You must be signed in to change notification settings - Fork 78
[CORE][CMAKE] Fix Linux compilation of WWLib #698
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
#include "bittype.h" | ||
#include "wwdebug.h" | ||
#include "mutex.h" | ||
#include <new.h> | ||
#include <new> | ||
#include <stdlib.h> | ||
#include <stddef.h> | ||
|
||
|
@@ -157,8 +157,14 @@ class AutoPoolClass | |
** Macro to declare the allocator for your class. Put this in the cpp file for | ||
** the class. | ||
*/ | ||
#if defined(_MSC_VER) && _MSC_VER < 1300 | ||
#define DEFINE_AUTO_POOL(T,BLOCKSIZE) \ | ||
ObjectPoolClass<T,BLOCKSIZE> AutoPoolClass<T,BLOCKSIZE>::Allocator; | ||
#else | ||
#define DEFINE_AUTO_POOL(T,BLOCKSIZE) \ | ||
template<>\ | ||
ObjectPoolClass<T,BLOCKSIZE> AutoPoolClass<T,BLOCKSIZE>::Allocator = {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this separation really necessary? Cannot just add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the compile error that this causes? Something about dependent name? It is odd that this requires a initializer because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If i remember it was: |
||
#endif | ||
|
||
|
||
/*********************************************************************************************** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,25 @@ | |
#ifndef _SYSTIMER_H | ||
|
||
#include "always.h" | ||
#ifdef _WIN32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can add empty line before this. |
||
#include <windows.h> | ||
#include "mmsys.h" | ||
|
||
#define TIMEGETTIME SystemTime.Get | ||
#define MS_TIMER_SECOND 1000 | ||
#else | ||
#include <sys/time.h> | ||
|
||
inline unsigned long systimerGetMS(void) | ||
{ | ||
struct timeval tv; | ||
gettimeofday(&tv, NULL); | ||
return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); | ||
} | ||
|
||
#define TIMEGETTIME systimerGetMS | ||
#define MS_TIMER_SECOND 1000 | ||
#endif | ||
|
||
/* | ||
** Class that just wraps around timeGetTime() | ||
|
Uh oh!
There was an error while loading. Please reload this page.