diff --git a/libaegisub/common/fs.cpp b/libaegisub/common/fs.cpp index 2d5fdee06..6ce45a08e 100644 --- a/libaegisub/common/fs.cpp +++ b/libaegisub/common/fs.cpp @@ -69,13 +69,16 @@ namespace ec = boost::system::errc; #undef CreateDirectory namespace agi { namespace fs { +namespace { + WRAP_BFS(file_size, SizeImpl) + WRAP_BFS(space, Space) +} + WRAP_BFS_IGNORE_ERROR(exists, Exists) WRAP_BFS_IGNORE_ERROR(is_regular_file, FileExists) WRAP_BFS_IGNORE_ERROR(is_directory, DirectoryExists) - WRAP_BFS(file_size, SizeImpl) WRAP_BFS(last_write_time, ModifiedTime) WRAP_BFS(create_directories, CreateDirectory) - WRAP_BFS(space, Space) WRAP_BFS(remove, Remove) WRAP_BFS(canonical, Canonicalize) diff --git a/src/ass_dialogue.cpp b/src/ass_dialogue.cpp index e2088e80c..e3bc1773c 100644 --- a/src/ass_dialogue.cpp +++ b/src/ass_dialogue.cpp @@ -144,17 +144,17 @@ void AssDialogue::Parse(std::string const& raw) { Text = text; } -void append_int(std::string &str, int v) { +static void append_int(std::string &str, int v) { boost::spirit::karma::generate(back_inserter(str), boost::spirit::karma::int_, v); str += ','; } -void append_str(std::string &out, std::string const& str) { +static void append_str(std::string &out, std::string const& str) { out += str; out += ','; } -void append_unsafe_str(std::string &out, std::string const& str) { +static void append_unsafe_str(std::string &out, std::string const& str) { for (auto c : str) { if (c == ',') out += ';'; diff --git a/src/hotkey.cpp b/src/hotkey.cpp index a7ced3930..a3d7ce715 100644 --- a/src/hotkey.cpp +++ b/src/hotkey.cpp @@ -223,7 +223,7 @@ std::string keypress_to_str(int key_code, int modifier) { return combo; } -bool check(std::string const& context, agi::Context *c, int key_code, int modifier) { +static bool check(std::string const& context, agi::Context *c, int key_code, int modifier) { std::string combo = keypress_to_str(key_code, modifier); if (combo.empty()) return false; @@ -237,7 +237,7 @@ bool check(std::string const& context, agi::Context *c, int key_code, int modifi bool check(std::string const& context, agi::Context *c, wxKeyEvent &evt) { try { - if (!hotkey::check(context, c, evt.GetKeyCode(), evt.GetModifiers())) { + if (!check(context, c, evt.GetKeyCode(), evt.GetModifiers())) { evt.Skip(); return false; } diff --git a/src/include/aegisub/hotkey.h b/src/include/aegisub/hotkey.h index f27644028..4b8721ca5 100644 --- a/src/include/aegisub/hotkey.h +++ b/src/include/aegisub/hotkey.h @@ -34,7 +34,6 @@ void init(); void clear(); bool check(std::string const& context, agi::Context *c, wxKeyEvent &evt); -bool check(std::string const& context, agi::Context *c, int key_code, wchar_t key_char, int modifier); std::string keypress_to_str(int key_code, int modifier); std::string get_hotkey_str_first(std::string const& context, std::string const& command); std::vector get_hotkey_strs(std::string const& context, std::string const& command); diff --git a/src/preferences.cpp b/src/preferences.cpp index 0a886ebf8..aa66b5f19 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -56,6 +56,7 @@ #include #include +namespace { /// General preferences page void General(wxTreebook *book, Preferences *parent) { auto p = new OptionPage(book, parent, _("General")); @@ -635,6 +636,7 @@ void Interface_Hotkeys::OnUpdateFilter(wxCommandEvent&) { dvc->Expand(context); } } +} void Preferences::SetOption(std::unique_ptr new_value) { pending_changes[new_value->GetName()] = std::move(new_value);