Remove unused parameter. Don't put check for g_network presence in ASSERT_WE_THINK.
This commit is contained in:
parent
2431d4d788
commit
dfa5f76c01
|
@ -1284,7 +1284,7 @@ ACTOR Future<Void> BgDDMountainChopper( DDQueueData* self, int teamCollectionInd
|
|||
}
|
||||
|
||||
traceEvent.detail("Moved", moved);
|
||||
traceEvent.log(true);
|
||||
traceEvent.log();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1381,7 +1381,7 @@ ACTOR Future<Void> BgDDValleyFiller( DDQueueData* self, int teamCollectionIndex)
|
|||
}
|
||||
|
||||
traceEvent.detail("Moved", moved);
|
||||
traceEvent.log(true);
|
||||
traceEvent.log();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ extern bool isAssertDisabled( int line );
|
|||
// ASSERT_WE_THINK() is to be used for assertions that we want to validate in testing, but which are judged too
|
||||
// risky to evaluate at runtime, because the code should work even if they are false and throwing internal_error() would
|
||||
// result in a bug. Don't use it for assertions that are *expensive*; look at EXPENSIVE_VALIDATION.
|
||||
#define ASSERT_WE_THINK( condition ) ASSERT( !g_network || !g_network->isSimulated() || (condition) )
|
||||
#define ASSERT_WE_THINK( condition ) ASSERT( !g_network->isSimulated() || (condition) )
|
||||
|
||||
#define ABORT_ON_ERROR( code_to_run ) \
|
||||
try { code_to_run; } \
|
||||
|
|
|
@ -978,7 +978,7 @@ TraceEvent& TraceEvent::backtrace(const std::string& prefix) {
|
|||
return detail(prefix + "Backtrace", platform::get_backtrace());
|
||||
}
|
||||
|
||||
void TraceEvent::log(bool useCurrentTime) {
|
||||
void TraceEvent::log() {
|
||||
if(!logged) {
|
||||
init();
|
||||
try {
|
||||
|
@ -1327,6 +1327,9 @@ void TraceEventFields::validateFormat() const {
|
|||
}
|
||||
|
||||
std::string traceableStringToString(const char* value, size_t S) {
|
||||
ASSERT_WE_THINK(S > 0 && value[S - 1] == '\0');
|
||||
if(g_network) {
|
||||
ASSERT_WE_THINK(S > 0 && value[S - 1] == '\0');
|
||||
}
|
||||
|
||||
return std::string(value, S - 1); // Exclude trailing \0 byte
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ public:
|
|||
return enabled;
|
||||
}
|
||||
|
||||
void log(bool useCurrentTime = false);
|
||||
void log();
|
||||
|
||||
~TraceEvent(); // Actually logs the event
|
||||
|
||||
|
|
Loading…
Reference in New Issue