Skip to content
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

Fixed compilation errors with c++14 and missing strdup() #179

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ endif((CMAKE_MAJOR_VERSION GREATER 3) OR (CMAKE_MAJOR_VERSION EQUAL 3))

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(Europa2 C CXX Java)
set(CMAKE_CXX_STANDARD 14)
add_definitions(-DTIXML_USE_STL=1)
enable_testing()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
Expand Down Expand Up @@ -39,4 +40,4 @@ add_subdirectory(src)
install(EXPORT Europa2 DESTINATION ${EUROPA_ROOT}/dist/europa)
install(DIRECTORY ${EUROPA_ROOT}/bin DESTINATION ${EUROPA_ROOT}/dist/europa)
install(DIRECTORY ${EUROPA_ROOT}/config DESTINATION ${EUROPA_ROOT}/dist/europa)
install(DIRECTORY ${EUROPA_ROOT}/bin/.makeproject DESTINATION ${EUROPA_ROOT}/dist/bin)
install(DIRECTORY ${EUROPA_ROOT}/bin/.makeproject DESTINATION ${EUROPA_ROOT}/dist/bin)
2 changes: 1 addition & 1 deletion bin/makeproject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python2
import re
import sys
import os
Expand Down
2 changes: 0 additions & 2 deletions src/PLASMA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ else()
else()
message(FATAL_ERROR "Failed to find boost libraries")
endif()
else()
message(FATAL_ERROR "Failed to find boost libraries")
endif()

add_subdirectory(TinyXml)
Expand Down
1 change: 1 addition & 0 deletions src/PLASMA/NDDL/base/antlr/NDDL3.g
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static void newNDDL3ParserFree(pNDDL3Parser ctx) {
{
#include "NddlInterpreter.hh"
#include "PathDefs.hh"
#include <cstring>

using namespace EUROPA;

Expand Down
6 changes: 6 additions & 0 deletions src/PLASMA/NDDL/component/Interpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
#include <iterator>

#include <boost/algorithm/string/classification.hpp>


// definition of before causes errors in newer versions of boost
#ifdef before
#undef before
#endif
#include <boost/algorithm/string/split.hpp>
#include <boost/smart_ptr/make_shared.hpp>

Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/PlanDatabase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ unsigned long PlanDatabase::countCompatibleTokens(const TokenId inactiveToken,
object->getOrderingChoices(tokenToOrder, choices, limit - count);

for (std::vector<std::pair<TokenId, TokenId> >::iterator it_b = choices.begin(); it_b != choices.end(); ++it_b) {
const std::pair<TokenId, TokenId>& tokenPair = *it_b;
results.push_back(std::make_pair<ObjectId, std::pair<TokenId, TokenId> >(object, tokenPair));
std::pair<TokenId, TokenId>& tokenPair = *it_b;
results.push_back(std::make_pair<ObjectId, std::pair<TokenId, TokenId> >(std::move(object), std::move(tokenPair)));
count++;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/Utils/base/DebugMsg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ internals_accessor;
internals_accessor internals() {
EUROPA::MutexGrabber grabber(debugMutex);
return std::make_pair<EUROPA::MutexGrabber,
boost::reference_wrapper<DebugMessage::DebugInternals> >(grabber,
boost::ref(debugInternals));
boost::reference_wrapper<DebugMessage::DebugInternals> >(std::move(grabber),
boost::reference_wrapper<DebugMessage::DebugInternals>(debugInternals));
}

}
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/Utils/base/Entity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ internals_accessor;
internals_accessor internals() {
MutexGrabber grabber(entityMutex);
return std::make_pair<MutexGrabber,
boost::reference_wrapper<EntityInternals> >(grabber,
boost::ref(entityInternals));
boost::reference_wrapper<EntityInternals> >(std::move(grabber),
boost::reference_wrapper<EntityInternals>(entityInternals));
}
}

Expand Down