simplify TYPE_CONSTANT code

This commit is contained in:
Garux
2021-03-25 21:59:31 +03:00
parent edabdd157e
commit 5008fa278f
15 changed files with 63 additions and 83 deletions

View File

@@ -254,8 +254,8 @@ public:
m_undoables.erase( undoable );
}
void setLevels( std::size_t levels ){
if ( levels > static_cast<unsigned>( MAX_UNDO_LEVELS() ) ) {
levels = MAX_UNDO_LEVELS();
if ( levels > static_cast<unsigned>( MAX_UNDO_LEVELS ) ) {
levels = MAX_UNDO_LEVELS;
}
while ( m_undo_stack.size() > levels )