Fix compilation errors on clang.

This commit is contained in:
Tarek Yasser
2023-10-10 03:54:33 +03:00
parent 636e24003d
commit 047fd86757
4 changed files with 9 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ bool Branch::addBranch(std::unique_ptr<Branch>&& branch)
return false;
branch->setParent(this);
_branches.emplace(branchName, move(branch));
_branches.emplace(branchName, std::move(branch));
for (const auto& id : _callbackTargetIds[Task::AddBranch])
_callbacks[id](*this, branchName);
@@ -77,7 +77,7 @@ bool Branch::addLeaf(std::unique_ptr<Leaf>&& leaf)
return false;
leaf->setParent(this);
_leaves.emplace(leafName, move(leaf));
_leaves.emplace(leafName, std::move(leaf));
for (const auto& id : _callbackTargetIds[Task::AddLeaf])
_callbacks[id](*this, leafName);
@@ -240,7 +240,7 @@ bool Branch::renameBranch(const std::string& name, const std::string& newName)
auto branchIt = _branches.find(name);
branchIt->second->setName(newName);
_branches.emplace(newName, move(branchIt->second));
_branches.emplace(newName, std::move(branchIt->second));
_branches.erase(name);
return true;
}
@@ -253,7 +253,7 @@ bool Branch::renameLeaf(const std::string& name, const std::string& newName)
auto leafIt = _leaves.find(name);
leafIt->second->setName(newName);
_leaves.emplace(newName, move(leafIt->second));
_leaves.emplace(newName, std::move(leafIt->second));
_leaves.erase(leafIt);
return true;
}

View File

@@ -62,6 +62,8 @@ class Renderer
static std::shared_ptr<Renderer> fromApi(Renderer::Api api);
static std::shared_ptr<Renderer> create(std::optional<Renderer::Api> api);
virtual ~Renderer() = default;
/**
* Callback for GL errors and warnings
* TODO: Make private once `Scene::getNewSharedWindow` is moved to the renderer.

View File

@@ -125,7 +125,7 @@ class Texture_Image : public Texture
/**
* Destructor
*/
~Texture_Image();
virtual ~Texture_Image();
/**
* Constructors/operators

View File

@@ -183,8 +183,8 @@ TEST_CASE("Testing adding and cutting existing branches and leaves")
CHECK(leaf.get() != nullptr);
oakSeeds = oak.getUpdateSeedList();
maple.addBranchAt("/", move(branch));
maple.addLeafAt("/", move(leaf));
maple.addBranchAt("/", std::move(branch));
maple.addLeafAt("/", std::move(leaf));
CHECK(maple == beech);
CHECK(oak != beech);