Move types.h to util/types.hpp

This commit is contained in:
Nekotekina 2020-12-12 15:01:29 +03:00
parent 666a18f5e5
commit b59f142d4e
75 changed files with 87 additions and 79 deletions

View file

@ -1,6 +1,6 @@
#pragma once
#include "Utilities/types.h"
#include "util/types.hpp"
#include "Utilities/mutex.h"
#include <memory>
@ -48,7 +48,7 @@ namespace id_manager
static constexpr std::pair<u32, u32> invl_range = invl_range_extract_impl<T>::invl_range;
static_assert(count && step && u64{step} * (count - 1) + base < u64{UINT32_MAX} + (base != 0 ? 1 : 0), "ID traits: invalid object range");
// TODO: Add more conditions
static_assert(!invl_range.second || (u64{invl_range.second} + invl_range.first <= 32 /*....*/ ));
};
@ -580,7 +580,7 @@ public:
{
std::lock_guard lock(id_manager::g_mutex);
if (const auto found = find_id<T, Get>(id); found &&
if (const auto found = find_id<T, Get>(id); found &&
(!found->second.owner_before(sptr) && !sptr.owner_before(found->second)))
{
ptr = std::move(found->second);