]> git.tdb.fi Git - libs/game.git/commitdiff
Make BufferedComponent's commit/prepare functions non-virtual
authorMikko Rasa <tdb@tdb.fi>
Sat, 22 Mar 2025 10:29:11 +0000 (12:29 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 22 Mar 2025 10:29:11 +0000 (12:29 +0200)
Customizing these should be handled through transactors.

source/game/component.h

index 8e46aa4cdccb7a3357c43d1123a39e65cb7dc94a..7250660d1089270634f8bc9b0a8a7eba86e2c8e2 100644 (file)
@@ -46,8 +46,8 @@ protected:
        T &write();
 
 public:
-       virtual void prepare_tick() { write_index = read_index+1; written = false; }
-       virtual void commit_tick() { if(written) read_index = write_index; }
+       void prepare_tick() { write_index = read_index+1; written = false; }
+       void commit_tick() { if(written) read_index = write_index; }
        uint8_t get_read_generation() const { return read_index; }
        uint8_t get_write_generation() const { return write_index; }
 };