From f270f07c86185984680999924d459215ca0fd980 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Mon, 14 Jul 2014 10:42:20 +0100 Subject: [PATCH] Fixed API compilation. --- CMakeLists.txt | 2 +- src/api/api.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7209b8cf..42e92acc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ set (LOOT_SRC "${CMAKE_SOURCE_DIR}/src/backend/metadata.cpp" set (LOOT_GUI_SRC ${LOOT_SRC} # Code the API doesn't need. "${CMAKE_SOURCE_DIR}/src/backend/graph.cpp" - "${CMAKE_SOURCE_DIR}/src/backend/network.cpp" + "${CMAKE_SOURCE_DIR}/src/backend/git.cpp" # Actual GUI code. "${CMAKE_SOURCE_DIR}/src/gui/ids.cpp" "${CMAKE_SOURCE_DIR}/src/gui/main.cpp" diff --git a/src/api/api.cpp b/src/api/api.cpp index 192cb183..5325af0d 100644 --- a/src/api/api.cpp +++ b/src/api/api.cpp @@ -158,6 +158,21 @@ unsigned int c_error(const unsigned int code, const std::string& what) { return c_error(loot::error(code, what.c_str())); } +//////////////////////////////////// +// Dummy Masterlist member functions +//////////////////////////////////// + +// The API doesn't depend on libgit2, by not compiling ".git.cpp", so the member functions are defined +// below as dummies. + +namespace loot { + void Masterlist::GetGitInfo(boost::filesystem::path& path) {} + + void Masterlist::Update(Game& game, const unsigned int language) { + this->MetadataList::Load(game.MasterlistPath()); + } +} + ////////////////////////////// // Error Handling Functions