Fix compilation error on GCC 7

This commit is contained in:
Daniel Chappuis 2018-07-21 22:50:54 +02:00
parent 9d5145b3c7
commit c186a35b2d
3 changed files with 24 additions and 20 deletions

View File

@ -26,6 +26,8 @@
#ifndef REACTPHYSICS3D_LOGGER_H
#define REACTPHYSICS3D_LOGGER_H
// If logging is enabled
#ifdef IS_LOGGING_ACTIVE
// Libraries
#include "containers/List.h"
@ -461,18 +463,6 @@ class Logger {
}
#ifdef IS_LOGGING_ACTIVE
// Use this macro to log something
#define RP3D_LOG(logger, level, category, message) logger->log(level, category, message)
#else // If logger is not active
// Empty macro in case logs are not enabled
#define RP3D_LOG(logger, level, category, message)
#endif
// Hash function for struct VerticesPair
namespace std {
@ -485,4 +475,15 @@ namespace std {
};
}
// Use this macro to log something
#define RP3D_LOG(logger, level, category, message) logger->log(level, category, message)
// If the logging is not enabled
#else
// Empty macro in case logs are not enabled
#define RP3D_LOG(logger, level, category, message)
#endif
#endif

View File

@ -23,6 +23,7 @@
* *
********************************************************************************/
// If profiling is enabled
#ifdef IS_PROFILING_ACTIVE
// Libraries

View File

@ -26,6 +26,9 @@
#ifndef REACTPHYSICS3D_PROFILER_H
#define REACTPHYSICS3D_PROFILER_H
// If profiling is enabled
#ifdef IS_PROFILING_ACTIVE
// Libraries
#include "configuration.h"
#include "engine/Timer.h"
@ -379,18 +382,10 @@ class ProfileSample {
}
};
#ifdef IS_PROFILING_ACTIVE
// Use this macro to start profile a block of code
#define RP3D_PROFILE(name, profiler) ProfileSample profileSample(name, profiler)
#else // If profile is not active
// Empty macro in case profiling is not active
#define RP3D_PROFILE(name, profiler)
#endif
// Return true if we are at the root of the profiler tree
inline bool ProfileNodeIterator::isRoot() {
return (mCurrentParentNode->getParentNode() == nullptr);
@ -504,5 +499,12 @@ inline void Profiler::destroy() {
}
// If profiling is disabled
#else
// Empty macro in case profiling is not active
#define RP3D_PROFILE(name, profiler)
#endif
#endif