Skip to content

Commit 4b19a4f

Browse files
committed
Change thread functions to void return type
1 parent 311cd15 commit 4b19a4f

6 files changed

Lines changed: 8 additions & 11 deletions

File tree

gframe/image_manager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ irr::video::ITexture* ImageManager::GetBigPicture(int code, float zoom) {
290290
tBigPicture = addTexture(name, img, origsize.Width * zoom, origsize.Height * zoom);
291291
return tBigPicture;
292292
}
293-
int ImageManager::LoadThumbThread() {
293+
void ImageManager::LoadThumbThread() {
294294
while(true) {
295295
imageManager.tThumbLoadingMutex.lock();
296296
imageManager.tThumbLoadingThreadRunning = !imageManager.tThumbLoadingCodes.empty();
@@ -330,7 +330,6 @@ int ImageManager::LoadThumbThread() {
330330
imageManager.tThumbLoadingMutex.unlock();
331331
}
332332
}
333-
return 0;
334333
}
335334
/**
336335
* Load managed card thumbnail texture.

gframe/image_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ImageManager {
2424
irr::video::ITexture* GetTextureThumb(int code);
2525
irr::video::ITexture* GetTextureField(int code);
2626
irr::video::ITexture* GetTextureButton(int code, bool defense = false);
27-
static int LoadThumbThread();
27+
static void LoadThumbThread();
2828

2929
std::unordered_map<int, irr::video::ITexture*> tMap[2];
3030
std::unordered_map<int, irr::video::ITexture*> tThumb;

gframe/replay_mode.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool ReplayMode::ReadReplayResponse() {
5656
set_responseb(pduel, resp);
5757
return result;
5858
}
59-
int ReplayMode::ReplayThread() {
59+
void ReplayMode::ReplayThread() {
6060
const auto& rh = cur_replay.pheader.base;
6161
mainGame->dInfo.Clear();
6262
mainGame->dInfo.isFirst = true;
@@ -69,7 +69,7 @@ int ReplayMode::ReplayThread() {
6969
set_message_handler(ReplayMode::MessageHandler);
7070
if(!StartDuel()) {
7171
EndDuel();
72-
return 0;
72+
return;
7373
}
7474
mainGame->dInfo.isStarted = true;
7575
mainGame->dInfo.isFinished = false;
@@ -152,7 +152,6 @@ int ReplayMode::ReplayThread() {
152152
skip_turn = 0;
153153
current_step = 0;
154154
skip_step = 0;
155-
return 0;
156155
}
157156
bool ReplayMode::StartDuel() {
158157
const auto& rh = cur_replay.pheader.base;

gframe/replay_mode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ReplayMode {
3030
static void SwapField();
3131
static void Pause(bool is_pause, bool is_step);
3232
static bool ReadReplayResponse();
33-
static int ReplayThread();
33+
static void ReplayThread();
3434
static bool StartDuel();
3535
static void EndDuel();
3636
static void Restart(bool refresh);

gframe/single_mode.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void SingleMode::SetResponse(unsigned char* resp, unsigned int len) {
2929
last_replay_response_size = last_replay.WriteResponse(resp, len);
3030
set_responseb(pduel, resp);
3131
}
32-
int SingleMode::SinglePlayThread() {
32+
void SingleMode::SinglePlayThread() {
3333
const int start_lp = 8000;
3434
const int start_hand = 5;
3535
const int draw_count = 1;
@@ -87,7 +87,7 @@ int SingleMode::SinglePlayThread() {
8787
}
8888
if(slen == 0) {
8989
end_duel(pduel);
90-
return 0;
90+
return;
9191
}
9292
mainGame->gMutex.lock();
9393
mainGame->HideElement(mainGame->wSinglePlay);
@@ -180,7 +180,6 @@ int SingleMode::SinglePlayThread() {
180180
if(mainGame->exit_on_return)
181181
mainGame->device->closeDevice();
182182
}
183-
return 0;
184183
}
185184
bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
186185
unsigned char* offset, * pbuf = msg;

gframe/single_mode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SingleMode {
1818
static bool StartPlay();
1919
static void StopPlay(bool is_exiting = false);
2020
static void SetResponse(unsigned char* resp, unsigned int len);
21-
static int SinglePlayThread();
21+
static void SinglePlayThread();
2222
static bool SinglePlayAnalyze(unsigned char* msg, unsigned int len);
2323

2424
static void SinglePlayRefresh(int flag = 0xf81fff);

0 commit comments

Comments
 (0)