8000 Bug fix/fix invalid cast by jsteemann · Pull Request #9755 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix/fix invalid cast #9755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
Prev Previous commit
Next Next commit
optimize for release builds
  • Loading branch information
jsteemann committed Aug 19, 2019
commit 1b0fdf33619a84153df3706dd62f83aaeaac9797
4 changes: 4 additions & 0 deletions arangod/IResearch/IResearchLinkCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
namespace {

arangodb::ClusterEngineType getEngineType() {
#ifdef ARANGODB_USE_GOOGLE_TESTS
// during the unit tests there is a mock storage engine which cannot be casted
// to a ClusterEngine at all. the only sensible way to find out the engine type is
// to try a dynamic_cast here and assume the MockEngine if the cast goes wrong
Expand All @@ -52,6 +53,9 @@ arangodb::ClusterEngineType getEngineType() {
return engine->engineType();
}
return arangodb::ClusterEngineType::MockEngine;
#else
return static_cast<arangodb::ClusterEngine*>(arangodb::EngineSelectorFeature::ENGINE)->engineType();
#endif
}

} // namespace
Expand Down
0