diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-26 18:37:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-26 18:37:00 +0200 |
commit | 76e1aebbe075287a8297194b38343467c76dd964 (patch) | |
tree | 0afa513ab80f2247686bbb62e5d2a6fa9aabc70c /include | |
parent | 8b5901000e9073d9ff6a3a86cd7c0e0172de7f5a (diff) |
Fix soundcloud (fetch client id), add authors to mangakatana, some other fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/Path.hpp | 2 | ||||
-rw-r--r-- | include/SearchBar.hpp | 1 | ||||
-rw-r--r-- | include/StringUtils.hpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/include/Path.hpp b/include/Path.hpp index 19c8eb9..571fb9e 100644 --- a/include/Path.hpp +++ b/include/Path.hpp @@ -39,7 +39,7 @@ namespace QuickMedia { Path parent() { size_t slash_index = data.rfind('/'); - if(slash_index != std::string::npos || slash_index == 0) + if(slash_index != std::string::npos && slash_index > 0) return Path(data.substr(0, slash_index)); return Path("/"); } diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp index 76ad24b..06c4c98 100644 --- a/include/SearchBar.hpp +++ b/include/SearchBar.hpp @@ -70,5 +70,6 @@ namespace QuickMedia { bool mouse_left_inside; float vertical_pos; sf::Clock time_since_search_update; + sf::Vector2u prev_window_size; }; }
\ No newline at end of file diff --git a/include/StringUtils.hpp b/include/StringUtils.hpp index 97c73dd..e97a423 100644 --- a/include/StringUtils.hpp +++ b/include/StringUtils.hpp @@ -13,5 +13,6 @@ namespace QuickMedia { // Returns the number of replaced substrings size_t string_replace_all(std::string &str, const std::string &old_str, const std::string &new_str); std::string strip(const std::string &str); + bool string_starts_with(const std::string &str, const char *sub); bool string_ends_with(const std::string &str, const std::string &ends_with_str); }
\ No newline at end of file |