diff options
-rw-r--r-- | core/vector.h | 5 | ||||
-rw-r--r-- | tools/editor/code_editor.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/core/vector.h b/core/vector.h index 16a09c1ddd..87248ccf68 100644 --- a/core/vector.h +++ b/core/vector.h @@ -70,7 +70,8 @@ class Vector { } _FORCE_INLINE_ size_t _get_alloc_size(size_t p_elements) const { - return nearest_power_of_2_templated(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int)); + //return nearest_power_of_2_templated(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int)); + return nearest_power_of_2(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int)); } _FORCE_INLINE_ bool _get_alloc_size_checked(size_t p_elements, size_t *out) const { @@ -79,7 +80,7 @@ class Vector { size_t p; if (_mul_overflow(p_elements, sizeof(T), &o)) return false; if (_add_overflow(o, sizeof(SafeRefCount)+sizeof(int), &p)) return false; - *out = nearest_power_of_2_templated(p); + *out = nearest_power_of_2(p); return true; #else // Speed is more important than correctness here, do the operations unchecked diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 968d02dfa5..cf8f40430b 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -148,6 +148,7 @@ void FindReplaceDialog::_replace_skip_callback() { void FindReplaceDialog::_replace() { + text_edit->begin_complex_operation(); if (is_replace_all_mode()) { //line as x so it gets priority in comparison, column as y @@ -228,7 +229,7 @@ void FindReplaceDialog::_replace() { _search(); } - + text_edit->end_complex_operation(); } |