Modernize client code (#6250)
[oweals/minetest.git] / src / rollback.h
index 2e6955c8d40bc1fd049b558ede0feb3f653a52d0..e0b3c7c555bb0a6bf8a4b99b5946498719415708 100644 (file)
@@ -29,8 +29,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 +61,7 @@ private:
        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<ActionRow> actionRowsFromSelect(sqlite3_stmt * stmt);
        ActionRow actionRowFromRollbackAction(const RollbackAction & action);
@@ -80,10 +80,10 @@ private:
                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<RollbackAction> action_todisk_buffer;
        std::list<RollbackAction> action_latest_buffer;