mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Death to trailing whitespace!
Sorry about that...
This commit is contained in:
+3
-3
@@ -41,7 +41,7 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
namespace loot {
|
||||
|
||||
|
||||
class Game;
|
||||
|
||||
/* Each Game object should store the config details specific to that game.
|
||||
@@ -78,7 +78,7 @@ namespace loot {
|
||||
|
||||
bool Load(Game& game, const unsigned int language); //Handles update with load fallback.
|
||||
bool Update(Game& game, const unsigned int language);
|
||||
|
||||
|
||||
std::string GetRevision(const boost::filesystem::path& path);
|
||||
std::string GetDate(const boost::filesystem::path& path);
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace loot {
|
||||
Game(const unsigned int baseGameCode, const std::string& lootFolder = "");
|
||||
|
||||
Game& SetDetails(const std::string& name, const std::string& masterFile,
|
||||
const std::string& repositoryURL, const std::string& repositoryBranch,
|
||||
const std::string& repositoryURL, const std::string& repositoryBranch,
|
||||
const std::string& path, const std::string& registry);
|
||||
Game& SetPath(const std::string& path); //Used by API.
|
||||
Game& Init();
|
||||
|
||||
+2
-4
@@ -94,7 +94,6 @@ namespace loot {
|
||||
git_diff * diff;
|
||||
git_buf buf;
|
||||
|
||||
|
||||
std::string ui_message;
|
||||
};
|
||||
|
||||
@@ -203,7 +202,8 @@ namespace loot {
|
||||
if (!fs::is_empty(repo_path)) {
|
||||
// Clear any read-only flags first.
|
||||
FixRepoPermissions(repo_path);
|
||||
// Now, libgit2 doesn't support cloning into non-empty folders. Rename the folder
|
||||
// Now, libgit2 doesn't support cloning into non-empty folders. Rename the folder
|
||||
|
||||
// temporarily, and move its contents back in afterwards, skipping any that then conflict.
|
||||
BOOST_LOG_TRIVIAL(trace) << "Repo path not empty, renaming folder.";
|
||||
// If the temp path already exists, it needs to be deleted.
|
||||
@@ -294,7 +294,6 @@ namespace loot {
|
||||
const git_oid * commit_id = git_object_id(git.obj);
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << "Creating the new branch.";
|
||||
|
||||
// Create a branch.
|
||||
git.call(git_commit_lookup(&git.commit, git.repo, commit_id));
|
||||
git.call(git_branch_create(&git.ref, git.repo, repo_branch.c_str(), git.commit, 0, git.sig, NULL));
|
||||
@@ -303,7 +302,6 @@ namespace loot {
|
||||
git.call(git_branch_set_upstream(git.ref, (string("origin/") + repo_branch).c_str()));
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << "Setting the upstream for the new branch.";
|
||||
|
||||
// Free tree and commit pointers. Reference pointer is still used below.
|
||||
git_object_free(git.obj);
|
||||
git_commit_free(git.commit);
|
||||
|
||||
@@ -460,7 +460,6 @@ namespace loot {
|
||||
p.Priority(0);
|
||||
p.SetPriorityExplicit(false);
|
||||
}
|
||||
|
||||
|
||||
//Compare this plugin against the given plugin.
|
||||
set<File> files = plugin.LoadAfter();
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace loot {
|
||||
//For 'enabled' and 'priority' metadata, use the given plugin's values, but if the 'priority' user value is zero, ignore it.
|
||||
void MergeMetadata(const Plugin& plugin);
|
||||
|
||||
//Returns the difference in metadata between the two plugins.
|
||||
//Returns the difference in metadata between the two plugins.
|
||||
//For 'enabled', use the given plugin's value.
|
||||
//For 'priority', use the given plugin's value, unless it is equal to this plugin's value, in which case return 0.
|
||||
Plugin DiffMetadata(const Plugin& plugin) const;
|
||||
|
||||
+4
-3
@@ -56,7 +56,7 @@ namespace loot {
|
||||
LootState g_app_state = LootState();
|
||||
|
||||
LootApp::LootApp() {}
|
||||
|
||||
|
||||
CefRefPtr<CefBrowserProcessHandler> LootApp::GetBrowserProcessHandler() {
|
||||
return this;
|
||||
}
|
||||
@@ -257,7 +257,8 @@ namespace loot {
|
||||
|
||||
newGameFolders.insert(game.FolderName());
|
||||
}
|
||||
// Remove deleted games. As the current game is stored using its index,
|
||||
// Remove deleted games. As the current game is stored using its index,
|
||||
|
||||
// removing an earlier game may invalidate it.
|
||||
for (auto it = _games.begin(); it != _games.end();) {
|
||||
if (newGameFolders.find(it->FolderName()) == newGameFolders.end()) {
|
||||
@@ -321,7 +322,7 @@ namespace loot {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to save LOOT's settings. Error: " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool LootState::AreSettingsValid() {
|
||||
if (!_settings["language"]) {
|
||||
if (_settings["Language"]) {
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace loot {
|
||||
|
||||
class LootApp : public CefApp,
|
||||
class LootApp : public CefApp,
|
||||
public CefBrowserProcessHandler,
|
||||
public CefRenderProcessHandler {
|
||||
public:
|
||||
@@ -66,7 +66,7 @@ namespace loot {
|
||||
public:
|
||||
LootState();
|
||||
|
||||
// Init may fail with no
|
||||
// Init may fail with no
|
||||
void Init(const std::string& cmdLineGame);
|
||||
const std::vector<std::string>& InitErrors() const;
|
||||
|
||||
|
||||
+7
-7
@@ -189,7 +189,6 @@ namespace loot {
|
||||
bool Handler::HandleComplexQuery(CefRefPtr<CefBrowser> browser, YAML::Node& request,
|
||||
CefRefPtr<Callback> callback) {
|
||||
|
||||
|
||||
const string requestName = request["name"].as<string>();
|
||||
|
||||
if (requestName == "find") {
|
||||
@@ -254,7 +253,7 @@ namespace loot {
|
||||
}
|
||||
else if (requestName == "closeSettings") {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Settings dialog closed and changes accepted, updating settings object.";
|
||||
|
||||
|
||||
// Update the game details and settings.
|
||||
g_app_state.UpdateSettings(request["args"][0]);
|
||||
// If the user has deleted a default game, we don't want to restore it now.
|
||||
@@ -733,7 +732,8 @@ namespace loot {
|
||||
}
|
||||
catch (loot::error &e) {
|
||||
if (e.code() == loot::error::ok) {
|
||||
// There was a parsing error, but roll-back was successful, so the process
|
||||
// There was a parsing error, but roll-back was successful, so the process
|
||||
|
||||
// should still complete.
|
||||
g_app_state.CurrentGame().masterlist.messages.push_back(Message(Message::error, e.what()));
|
||||
wasChanged = true;
|
||||
@@ -914,7 +914,6 @@ namespace loot {
|
||||
}
|
||||
|
||||
YAML::Node Handler::GenerateDerivedMetadata(const std::string& pluginName) {
|
||||
|
||||
// Now rederive the displayed metadata from the masterlist and userlist.
|
||||
auto pluginIt = g_app_state.CurrentGame().plugins.find(boost::locale::to_lower(pluginName));
|
||||
if (pluginIt != g_app_state.CurrentGame().plugins.end()) {
|
||||
@@ -939,7 +938,8 @@ namespace loot {
|
||||
}
|
||||
|
||||
// The clipboard takes a Unicode (ie. UTF-16) string that it then owns and must not
|
||||
// be destroyed by LOOT. Convert the string, then copy it into a new block of
|
||||
// be destroyed by LOOT. Convert the string, then copy it into a new block of
|
||||
|
||||
// memory for the clipboard.
|
||||
wstring wtext = ToWinWide(text);
|
||||
wchar_t * wcstr = new wchar_t[wtext.length() + 1];
|
||||
@@ -981,7 +981,7 @@ namespace loot {
|
||||
CefRefPtr<CefLifeSpanHandler> LootHandler::GetLifeSpanHandler() {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
CefRefPtr<CefLoadHandler> LootHandler::GetLoadHandler() {
|
||||
return this;
|
||||
}
|
||||
@@ -1133,7 +1133,7 @@ namespace loot {
|
||||
<< "<h2>Failed to load URL " << std::string(failedUrl)
|
||||
<< " with error " << std::string(errorText) << " (" << errorCode
|
||||
<< ").</h2></body></html>";
|
||||
|
||||
|
||||
frame->LoadString(ss.str(), failedUrl);
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -62,7 +62,7 @@ namespace loot {
|
||||
void SortPlugins(CefRefPtr<Callback> callback);
|
||||
|
||||
// Handle queries with input arguments.
|
||||
bool HandleComplexQuery(CefRefPtr<CefBrowser> browser, YAML::Node& request,
|
||||
bool HandleComplexQuery(CefRefPtr<CefBrowser> browser, YAML::Node& request,
|
||||
CefRefPtr<Callback> callback);
|
||||
|
||||
void Find(CefRefPtr<CefBrowser> browser, const std::string& search);
|
||||
@@ -75,7 +75,7 @@ namespace loot {
|
||||
YAML::Node Handler::GenerateDerivedMetadata(const std::string& pluginName);
|
||||
YAML::Node Handler::GenerateDerivedMetadata(const Plugin& file, const Plugin& masterlist, const Plugin& userlist);
|
||||
|
||||
void CopyToClipboard(const std::string& text);
|
||||
void CopyToClipboard(const std::string& text);
|
||||
private:
|
||||
IMPLEMENT_REFCOUNTING(Handler);
|
||||
};
|
||||
@@ -129,9 +129,9 @@ namespace loot {
|
||||
return this;
|
||||
}
|
||||
|
||||
virtual bool OnBeforeBrowse(CefRefPtr< CefBrowser > browser,
|
||||
CefRefPtr< CefFrame > frame,
|
||||
CefRefPtr< CefRequest > request,
|
||||
virtual bool OnBeforeBrowse(CefRefPtr< CefBrowser > browser,
|
||||
CefRefPtr< CefFrame > frame,
|
||||
CefRefPtr< CefRequest > request,
|
||||
bool is_redirect) OVERRIDE;
|
||||
|
||||
// Request that all existing browser windows close.
|
||||
|
||||
@@ -51,7 +51,7 @@ CefSettings GetCefSettings() {
|
||||
|
||||
// Set CEF logging.
|
||||
CefString(&cef_settings.log_file).FromString((g_path_local / "CEFDebugLog.txt").string());
|
||||
|
||||
|
||||
// Enable remote debugging.
|
||||
cef_settings.remote_debugging_port = 8080;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user