X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Frollback.h;h=1d9949d1520676094d5c548dc0a9dc3de8ee5f26;hb=a1868e8f6ca191edc03da342fd7c3088732e1b00;hp=2e6955c8d40bc1fd049b558ede0feb3f653a52d0;hpb=b1965ac20922e3722392114bd63a22b403dcbe98;p=dragonfireclient.git diff --git a/src/rollback.h b/src/rollback.h index 2e6955c8d..1d9949d15 100644 --- a/src/rollback.h +++ b/src/rollback.h @@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef ROLLBACK_HEADER -#define ROLLBACK_HEADER +#pragma once #include #include "irr_v3d.h" @@ -29,8 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc., class IGameDef; -class ActionRow; -class Entity; +struct ActionRow; +struct Entity; class RollbackManager: public IRollbackManager { @@ -61,7 +60,7 @@ class RollbackManager: public IRollbackManager const char * getActorName(const int id); const char * getNodeName(const int id); bool createTables(); - void initDatabase(); + bool initDatabase(); bool registerRow(const ActionRow & row); const std::list actionRowsFromSelect(sqlite3_stmt * stmt); ActionRow actionRowFromRollbackAction(const RollbackAction & action); @@ -80,10 +79,10 @@ class RollbackManager: public IRollbackManager time_t suspect_t, v3s16 action_p, time_t action_t); - IGameDef * gamedef; + IGameDef *gamedef = nullptr; std::string current_actor; - bool current_actor_is_guess; + bool current_actor_is_guess = false; std::list action_todisk_buffer; std::list action_latest_buffer; @@ -103,5 +102,3 @@ class RollbackManager: public IRollbackManager std::vector knownActors; std::vector knownNodes; }; - -#endif