Skip to content

Commit

Permalink
#5623: Remove the wrapper method in map::algorithm, directly use the …
Browse files Browse the repository at this point in the history
…GraphComparer.
  • Loading branch information
codereader committed May 24, 2021
1 parent 16f298d commit 4eb10c4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libs/scene/merge/MergeOperation.h
Expand Up @@ -2,7 +2,7 @@

#include <list>
#include <memory>
#include "../SceneGraphComparer.h"
#include "ComparisonResult.h"
#include "MergeAction.h"

namespace scene
Expand Down
7 changes: 6 additions & 1 deletion radiantcore/map/Map.cpp
Expand Up @@ -57,6 +57,8 @@

#include <fmt/format.h>
#include "scene/ChildPrimitives.h"
#include "scene/merge/GraphComparer.h"
#include "scene/merge/MergeOperation.h"

namespace map
{
Expand Down Expand Up @@ -964,7 +966,10 @@ void Map::mergeMap(const cmd::ArgumentList& args)
const auto& otherRoot = resource->getRootNode();

// Compare the scenes and get the report
auto result = algorithm::compareGraphs(otherRoot, getRoot());
auto result = scene::merge::GraphComparer::Compare(otherRoot, getRoot());

// Create the merge actions
auto operation = scene::merge::MergeOperation::CreateFromComparisonResult(*result);
}
}
catch (const IMapResource::OperationException& ex)
Expand Down
7 changes: 0 additions & 7 deletions radiantcore/map/algorithm/Import.cpp
Expand Up @@ -375,13 +375,6 @@ void importFromStream(std::istream& stream)
}
}

scene::merge::ComparisonResult::Ptr compareGraphs(const scene::IMapRootNodePtr& source, const scene::IMapRootNodePtr& base)
{
assert(source && base);

return scene::merge::GraphComparer::Compare(source, base);
}

}

}
4 changes: 0 additions & 4 deletions radiantcore/map/algorithm/Import.h
Expand Up @@ -3,7 +3,6 @@
#include <istream>
#include <string>
#include <memory>
#include "scene/merge/ComparisonResult.h"

namespace scene
{
Expand Down Expand Up @@ -56,9 +55,6 @@ MapFormatPtr determineMapFormat(std::istream& stream, const std::string& type);
*/
MapFormatPtr determineMapFormat(std::istream& stream);

// Runs a comparison of "source" (changed map) against the "base" (original)
scene::merge::ComparisonResult::Ptr compareGraphs(const scene::IMapRootNodePtr& source, const scene::IMapRootNodePtr& base);

}

}

0 comments on commit 4eb10c4

Please sign in to comment.