1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Fix some issues found by cppcheck.

This commit is contained in:
bruvzg
2022-04-05 13:40:26 +03:00
parent 72407a9cfb
commit f851c4aa33
163 changed files with 776 additions and 767 deletions

View File

@@ -149,7 +149,7 @@ void PoolAllocator::compact_up(int p_from) {
}
}
bool PoolAllocator::find_entry_index(EntryIndicesPos *p_map_pos, Entry *p_entry) {
bool PoolAllocator::find_entry_index(EntryIndicesPos *p_map_pos, const Entry *p_entry) {
EntryArrayPos entry_pos = entry_max;
for (int i = 0; i < entry_count; i++) {
@@ -424,7 +424,7 @@ bool PoolAllocator::is_locked(ID p_mem) const {
}
mt_lock();
const Entry *e = ((PoolAllocator *)(this))->get_entry(p_mem);
const Entry *e = const_cast<PoolAllocator *>(this)->get_entry(p_mem);
if (!e) {
mt_unlock();
ERR_PRINT("!e");