Cleanup includes and improve code style.
This commit is contained in:
parent
608fc9c4c3
commit
41f5777379
12 changed files with 21 additions and 9 deletions
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <Corrade/Utility/Format.h>
|
#include <Corrade/Utility/Format.h>
|
||||||
#include <Corrade/Utility/String.h>
|
#include <Corrade/Utility/String.h>
|
||||||
#include <Corrade/Utility/Unicode.h>
|
#include <Corrade/Utility/Unicode.h>
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <SDL_events.h>
|
#include <SDL_events.h>
|
||||||
#include <SDL_messagebox.h>
|
#include <SDL_messagebox.h>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <Corrade/Containers/ScopeGuard.h>
|
#include <Corrade/Containers/ScopeGuard.h>
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <Corrade/Containers/ScopeGuard.h>
|
#include <Corrade/Containers/ScopeGuard.h>
|
||||||
#include <Corrade/Utility/Format.h>
|
#include <Corrade/Utility/Format.h>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "../FontAwesome/IconsFontAwesome5.h"
|
#include "../FontAwesome/IconsFontAwesome5.h"
|
||||||
|
|
||||||
#include "../GameData/StyleNames.h"
|
#include "../GameData/StyleNames.h"
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <Corrade/Containers/Optional.h>
|
#include <Corrade/Containers/Optional.h>
|
||||||
#include <Corrade/Containers/Pointer.h>
|
|
||||||
#include <Corrade/Containers/StaticArray.h>
|
#include <Corrade/Containers/StaticArray.h>
|
||||||
#include <Corrade/Containers/String.h>
|
#include <Corrade/Containers/String.h>
|
||||||
#include <Corrade/Containers/StringView.h>
|
#include <Corrade/Containers/StringView.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <Corrade/Containers/GrowableArray.h>
|
#include <Corrade/Containers/Array.h>
|
||||||
#include <Corrade/Containers/String.h>
|
#include <Corrade/Containers/String.h>
|
||||||
#include <Corrade/Containers/StringView.h>
|
#include <Corrade/Containers/StringView.h>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <Corrade/Containers/String.h>
|
#include <Corrade/Containers/String.h>
|
||||||
#include <Corrade/Containers/StringView.h>
|
#include <Corrade/Containers/StringView.h>
|
||||||
|
|
||||||
#include <efsw/efsw.hpp>
|
//#include <efsw/efsw.hpp>
|
||||||
|
|
||||||
#include "Backup.h"
|
#include "Backup.h"
|
||||||
#include "../GameObjects/Profile.h"
|
#include "../GameObjects/Profile.h"
|
||||||
|
@ -46,7 +46,7 @@ class BackupManager {
|
||||||
bool create(const GameObjects::Profile& profile);
|
bool create(const GameObjects::Profile& profile);
|
||||||
|
|
||||||
bool remove(std::size_t index);
|
bool remove(std::size_t index);
|
||||||
bool remove(Containers::StringView filename);
|
//bool remove(Containers::StringView filename);
|
||||||
|
|
||||||
bool restore(std::size_t index);
|
bool restore(std::size_t index);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <Corrade/Utility/Format.h>
|
#include <Corrade/Utility/Format.h>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <Corrade/Containers/GrowableArray.h>
|
||||||
#include <Corrade/Containers/ScopeGuard.h>
|
#include <Corrade/Containers/ScopeGuard.h>
|
||||||
#include <Corrade/Containers/StaticArray.h>
|
#include <Corrade/Containers/StaticArray.h>
|
||||||
#include <Corrade/Utility/Format.h>
|
#include <Corrade/Utility/Format.h>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <Corrade/Containers/GrowableArray.h>
|
||||||
#include <Corrade/Containers/Optional.h>
|
#include <Corrade/Containers/Optional.h>
|
||||||
#include <Corrade/Utility/Path.h>
|
#include <Corrade/Utility/Path.h>
|
||||||
|
|
||||||
|
|
|
@ -45,20 +45,19 @@ struct Version {
|
||||||
bool prerelease = false;
|
bool prerelease = false;
|
||||||
long fullVersion = 0;
|
long fullVersion = 0;
|
||||||
|
|
||||||
inline bool operator==(const Version& other) const {
|
bool operator==(const Version& other) const {
|
||||||
return fullVersion == other.fullVersion && prerelease == other.prerelease;
|
return fullVersion == other.fullVersion && prerelease == other.prerelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator>(const Version& other) const {
|
bool operator>(const Version& other) const {
|
||||||
if((fullVersion > other.fullVersion) ||
|
if((fullVersion > other.fullVersion) ||
|
||||||
(fullVersion == other.fullVersion && !prerelease && other.prerelease))
|
(fullVersion == other.fullVersion && !prerelease && other.prerelease))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
explicit operator Containers::String() const {
|
explicit operator Containers::String() const {
|
||||||
return Utility::format("{}.{}.{}{}", major, minor, patch, prerelease ? "-pre" : "");
|
return Utility::format("{}.{}.{}{}", major, minor, patch, prerelease ? "-pre" : "");
|
||||||
|
|
Loading…
Reference in a new issue