Skip to content

Commit 8e21b7c

Browse files
committed
Rename poorly-named variable.
1 parent 06e3983 commit 8e21b7c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Glob2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ int Glob2::run(int argc, char *argv[])
235235
globalContainer->mainthr = std::this_thread::get_id();
236236
globalContainer->mainthrSet = true;
237237
if (!globalContainer->hostServer && !globalContainer->runNoX) {
238-
globalContainer->otherthread = new std::thread(&Glob2::run, this, argc, argv);
238+
globalContainer->logicThread = new std::thread(&Glob2::run, this, argc, argv);
239239
}
240240
}
241241
if (!globalContainer->hostServer &&
@@ -447,8 +447,8 @@ int Glob2::run(int argc, char *argv[])
447447
}
448448
}
449449

450-
// quit event loop so otherthread can be joined by main thread
451-
if (globalContainer->otherthread)
450+
// quit event loop so logic thread can be joined by main thread
451+
if (globalContainer->logicThread)
452452
{
453453
EventListener *el = EventListener::instance();
454454
el->stop();

src/GlobalContainer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ GlobalContainer::GlobalContainer(void)
130130
replayShowFlags = true;
131131

132132
mainthrSet = false;
133-
otherthread = nullptr;
133+
logicThread = nullptr;
134134

135135
#ifndef YOG_SERVER_ONLY
136136
replayReader = NULL;
@@ -524,8 +524,8 @@ void GlobalContainer::loadClient(bool runEventListener)
524524
gfx->unsetContext();
525525
el = new EventListener(gfx);
526526
el->run();
527-
otherthread->join();
528-
delete otherthread;
527+
logicThread->join();
528+
delete logicThread;
529529
return;
530530
}
531531

src/GlobalContainer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ class GlobalContainer
142142
bool replayShowAreas; //!< Show areas of gui.localPlayer or not. Can be edited real-time.
143143
bool replayShowFlags; //!< Show all flags or show none. Can be edited real-time.
144144

145-
// other thread handles events in the queue, game logic, rendering, etc.
146-
std::thread* otherthread;
145+
// logic thread handles events in the queue, game logic, rendering, etc.
146+
std::thread* logicThread;
147147
// main thread listens for SDL events and adds them to a queue
148148
std::thread::id mainthr;
149149
std::atomic<bool> mainthrSet;

0 commit comments

Comments
 (0)