Files
NazaraEngine/include/Nazara/Platform/Icon.inl
Gawaboumga bbac0838dd Include-What-You-Use (#137)
* IWYU Core

* IWYU Noise

* IWYU Utility

* IWYU Audio

* IWYU Platform

* IWYU Lua

* IWYU Network

* IWYU Physics2D

* IWYU Physics3D

* IWYU Renderer

* IWYU Graphics

* IWYU NDKServer

* IWYU Fix

* Try to fix compilation

* Other fixes
2017-10-01 11:17:09 +02:00

42 lines
766 B
C++

// Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
Icon::Icon() :
m_impl(nullptr)
{
}
inline Icon::Icon(const Image& icon)
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
Create(icon);
}
Icon::~Icon()
{
Destroy();
}
bool Icon::IsValid() const
{
return m_impl != nullptr;
}
template<typename... Args>
IconRef Icon::New(Args&&... args)
{
std::unique_ptr<Icon> object(new Icon(std::forward<Args>(args)...));
object->SetPersistent(false);
return object.release();
}
}
#include <Nazara/Platform/DebugOff.hpp>