mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor
This commit is contained in:
parent
167388aefb
commit
ef28a368cb
12 changed files with 54 additions and 51 deletions
|
|
@ -50,7 +50,7 @@ bool AtlasBuilder::has(const std::string& name) const {
|
|||
return names.find(name) != names.end();
|
||||
}
|
||||
|
||||
Atlas* AtlasBuilder::build(uint extrusion, bool prepare, uint maxResolution) {
|
||||
std::unique_ptr<Atlas> AtlasBuilder::build(uint extrusion, bool prepare, uint maxResolution) {
|
||||
if (maxResolution == 0) {
|
||||
maxResolution = Texture::MAX_RESOLUTION;
|
||||
}
|
||||
|
|
@ -99,5 +99,5 @@ Atlas* AtlasBuilder::build(uint extrusion, bool prepare, uint maxResolution) {
|
|||
unitX * x, unitY * y, unitX * (x + w), unitY * (y + h)
|
||||
);
|
||||
}
|
||||
return new Atlas(std::move(canvas), regions, prepare);
|
||||
return std::make_unique<Atlas>(std::move(canvas), regions, prepare);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue