remove unused replay_to_process_data_result()

This commit is contained in:
gfgtdf 2024-03-06 18:14:21 +01:00
parent 41554735ed
commit 638e37ddf8
2 changed files with 3 additions and 30 deletions

View file

@ -480,8 +480,8 @@ playmp_controller::PROCESS_DATA_RESULT playmp_controller::process_network_turn_i
//note, that this function might call itself recursively: do_replay -> ... -> get_user_choice -> ... -> receive_actions -> ... -> handle_turn
resources::recorder->add_config(t, replay::MARK_AS_SENT);
PROCESS_DATA_RESULT retv = replay_to_process_data_result(do_replay());
return retv;
do_replay();
return PROCESS_DATA_RESULT::CONTINUE;
}
void playmp_controller::process_network_side_drop_impl(const config& side_drop_c)
@ -682,21 +682,3 @@ void playmp_controller::send_change_side_controller(int side, const std::string&
change["player"] = player;
send_to_wesnothd(cfg);
}
playmp_controller::PROCESS_DATA_RESULT playmp_controller::replay_to_process_data_result(REPLAY_RETURN replayreturn)
{
switch(replayreturn)
{
case REPLAY_RETURN_AT_END:
return PROCESS_DATA_RESULT::CONTINUE;
case REPLAY_FOUND_DEPENDENT:
return PROCESS_DATA_RESULT::FOUND_DEPENDENT;
case REPLAY_FOUND_END_TURN:
return PROCESS_DATA_RESULT::END_TURN;
case REPLAY_FOUND_END_LEVEL:
return PROCESS_DATA_RESULT::END_LEVEL;
default:
assert(false);
throw "found invalid REPLAY_RETURN";
}
}

View file

@ -67,16 +67,8 @@ private:
enum class PROCESS_DATA_RESULT
{
CONTINUE,
RESTART_TURN,
END_TURN,
/** When the host uploaded the next scenario this is returned. */
END_LINGER,
/** When we couldn't process the network data because we found a dependent command, this should only happen if we were called playmp_controller::from handle_generic_event -> sync_network*/
FOUND_DEPENDENT,
/** when we couldn't handle the given action currently. */
CANNOT_HANDLE,
/** We found a player action in the replay that caused the game to end*/
END_LEVEL
CANNOT_HANDLE
};
/**
* @param unsync_only if false (default) this can exceute synced (gamestate changing) turn commands (recall, move, etc.)
@ -97,7 +89,6 @@ private:
/// Send [change_controller] to the multiplayer server
void send_change_side_controller(int side, const std::string& player);
static PROCESS_DATA_RESULT replay_to_process_data_result(REPLAY_RETURN replayreturn);
/// Helper to preprocess infoming network data.
playturn_network_adapter network_reader_;