Fix FontStruct to be C++11 compliant

This commit is contained in:
Katy Coe 2017-03-05 21:28:31 +01:00
parent a47b43b427
commit 16261038c4

View File

@ -27,7 +27,17 @@ class FontSys {
{
fs.font = nullptr;
}
FontStruct(FontStruct const& fs) = delete;
FontStruct &operator=(FontStruct &&fs) {
if (&fs != this) {
font = fs.font;
face = std::move(fs.face);
size = fs.size;
flags = fs.flags;
fs.font = nullptr;
}
return *this;
}
FontStruct(FontStruct const& fs) = delete;
~FontStruct() {
if (font) DeleteObject(font);
}