aboutsummaryrefslogtreecommitdiff
path: root/engines/testbed/misc.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-13 13:12:23 -0400
committerMatthew Hoops2011-06-13 13:12:23 -0400
commitd355475a0416897ed254fa85f4d63d0f75d9c7ea (patch)
tree184892480ebb704b28163c51999e50c414e85f8a /engines/testbed/misc.cpp
parent224c71e483e09931ba386555ff3b436b9defe63d (diff)
parentbfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (diff)
downloadscummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.gz
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.bz2
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/testbed/misc.cpp')
-rw-r--r--engines/testbed/misc.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index 35b3c6bfe2..034d3eb27e 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -24,13 +24,12 @@
namespace Testbed {
-Common::String MiscTests::getHumanReadableFormat(TimeDate &td) {
+Common::String MiscTests::getHumanReadableFormat(const TimeDate &td) {
return Common::String::format("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900);
}
void MiscTests::timerCallback(void *arg) {
// Increment arg which actually points to an int
- // arg must point to a static data, threads otherwise have their own stack
int &valToModify = *((int *) arg);
valToModify = 999; // some arbitrary value
}
@@ -110,7 +109,7 @@ TestExitStatus MiscTests::testDateTime() {
}
TestExitStatus MiscTests::testTimers() {
- static int valToModify = 0;
+ int valToModify = 0;
if (g_system->getTimerManager()->installTimerProc(timerCallback, 100000, &valToModify)) {
g_system->delayMillis(150);
g_system->getTimerManager()->removeTimerProc(timerCallback);
@@ -132,7 +131,7 @@ TestExitStatus MiscTests::testMutexes() {
Testsuite::writeOnScreen("Installing mutex", Common::Point(0, 100));
}
- static SharedVars sv = {1, 1, true, g_system->createMutex()};
+ SharedVars sv = {1, 1, true, g_system->createMutex()};
if (g_system->getTimerManager()->installTimerProc(criticalSection, 100000, &sv)) {
g_system->delayMillis(150);