clang-format
mogudes coses de config.yaml a debug.yaml
This commit is contained in:
@@ -2,41 +2,41 @@
|
||||
|
||||
namespace scenes {
|
||||
|
||||
SurfaceHandle::SurfaceHandle(const char* file)
|
||||
: surface_(JD8_LoadSurface(file)) {}
|
||||
SurfaceHandle::SurfaceHandle(const char* file)
|
||||
: surface_(JD8_LoadSurface(file)) {}
|
||||
|
||||
SurfaceHandle::~SurfaceHandle() {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
}
|
||||
|
||||
SurfaceHandle::SurfaceHandle(SurfaceHandle&& other) noexcept
|
||||
: surface_(other.surface_) {
|
||||
other.surface_ = nullptr;
|
||||
}
|
||||
|
||||
SurfaceHandle& SurfaceHandle::operator=(SurfaceHandle&& other) noexcept {
|
||||
if (this != &other) {
|
||||
SurfaceHandle::~SurfaceHandle() {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = other.surface_;
|
||||
}
|
||||
|
||||
SurfaceHandle::SurfaceHandle(SurfaceHandle&& other) noexcept
|
||||
: surface_(other.surface_) {
|
||||
other.surface_ = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SurfaceHandle::reset(const char* file) {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = file ? JD8_LoadSurface(file) : nullptr;
|
||||
}
|
||||
SurfaceHandle& SurfaceHandle::operator=(SurfaceHandle&& other) noexcept {
|
||||
if (this != &other) {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = other.surface_;
|
||||
other.surface_ = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SurfaceHandle::adopt(JD8_Surface raw) {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = raw;
|
||||
}
|
||||
void SurfaceHandle::reset(const char* file) {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = file ? JD8_LoadSurface(file) : nullptr;
|
||||
}
|
||||
|
||||
JD8_Surface SurfaceHandle::release() {
|
||||
JD8_Surface r = surface_;
|
||||
surface_ = nullptr;
|
||||
return r;
|
||||
}
|
||||
void SurfaceHandle::adopt(JD8_Surface raw) {
|
||||
if (surface_) JD8_FreeSurface(surface_);
|
||||
surface_ = raw;
|
||||
}
|
||||
|
||||
JD8_Surface SurfaceHandle::release() {
|
||||
JD8_Surface r = surface_;
|
||||
surface_ = nullptr;
|
||||
return r;
|
||||
}
|
||||
|
||||
} // namespace scenes
|
||||
|
||||
Reference in New Issue
Block a user