From 4b4b4705501302e3704bc6ed559595419d90c801 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Mon, 13 May 2019 20:23:01 +0200 Subject: [PATCH] Extend ProjectJournal docs, thx to @DomClark --- include/ProjectJournal.h | 3 +++ src/core/ProjectJournal.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/include/ProjectJournal.h b/include/ProjectJournal.h index e0e738b70..cb487617b 100644 --- a/include/ProjectJournal.h +++ b/include/ProjectJournal.h @@ -34,6 +34,7 @@ class JournallingObject; +//! @warning many parts of this class may be rewritten soon class ProjectJournal { public: @@ -76,7 +77,9 @@ public: reallocID( _id, NULL ); } + //! hack, not used when saving a file static jo_id_t idToSave( jo_id_t id ); + //! hack, not used when loading a savefile static jo_id_t idFromSave( jo_id_t id ); void clearJournal(); diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index ce811dbc5..e3cd362cb 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -29,6 +29,8 @@ #include "JournallingObject.h" #include "Song.h" +//! Avoid clashes between loaded IDs (have the bit cleared) +//! and newly created IDs (have the bit set) static const int EO_ID_MSB = 1 << 23; const int ProjectJournal::MAX_UNDO_STATES = 100; // TODO: make this configurable in settings