Switch Nazara to C++20

This commit is contained in:
Lynix
2023-11-14 14:24:28 +01:00
parent 35b4da0d4b
commit e5789d1749
17 changed files with 51 additions and 57 deletions

View File

@@ -174,13 +174,13 @@ namespace Nz
// The default police can make live one hardware atlas after the free of a module (which could be problematic)
// So, if the default police use a hardware atlas, we stole it.
// I don't like this solution, but I don't have any better
if (!defaultAtlas.unique())
if (defaultAtlas.use_count() > 1)
{
// Still at least one police use the atlas
// At least one police use the atlas
const std::shared_ptr<Font>& defaultFont = Font::GetDefault();
defaultFont->SetAtlas(nullptr);
if (!defaultAtlas.unique())
if (!defaultAtlas.use_count() > 1)
{
// Still not the only one to own it ? Then crap.
NazaraWarning("Default font atlas uses hardware storage and is still used");