]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/rollback.h
serverpackethandler: Minor log message fixes
[dragonfireclient.git] / src / rollback.h
index c57e38ab0bbc7330c1b78dd0cbb07a1c7726801a..1d9949d1520676094d5c548dc0a9dc3de8ee5f26 100644 (file)
@@ -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 <string>
 #include "irr_v3d.h"
@@ -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<ActionRow> 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<RollbackAction> action_todisk_buffer;
        std::list<RollbackAction> action_latest_buffer;
@@ -103,5 +102,3 @@ class RollbackManager: public IRollbackManager
        std::vector<Entity> knownActors;
        std::vector<Entity> knownNodes;
 };
-
-#endif