Cleanup includes and improve code style.

This commit is contained in:
Guillaume Jacquemin 2024-08-23 17:09:14 +02:00
parent 608fc9c4c3
commit 41f5777379
Signed by: williamjcm
SSH key fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A
12 changed files with 21 additions and 9 deletions

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include <Corrade/Utility/Format.h>
#include <Corrade/Utility/String.h>
#include <Corrade/Utility/Unicode.h>

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include <SDL_events.h>
#include <SDL_messagebox.h>

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include <algorithm>
#include <Corrade/Containers/ScopeGuard.h>

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Utility/Format.h>

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include "../FontAwesome/IconsFontAwesome5.h"
#include "../GameData/StyleNames.h"

View file

@ -17,7 +17,6 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/Pointer.h>
#include <Corrade/Containers/StaticArray.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringView.h>

View file

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// 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/StringView.h>

View file

@ -21,7 +21,7 @@
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringView.h>
#include <efsw/efsw.hpp>
//#include <efsw/efsw.hpp>
#include "Backup.h"
#include "../GameObjects/Profile.h"
@ -46,7 +46,7 @@ class BackupManager {
bool create(const GameObjects::Profile& profile);
bool remove(std::size_t index);
bool remove(Containers::StringView filename);
//bool remove(Containers::StringView filename);
bool restore(std::size_t index);

View file

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstring>
#include <algorithm>
#include <Corrade/Utility/Format.h>

View file

@ -16,6 +16,7 @@
#include <algorithm>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Containers/StaticArray.h>
#include <Corrade/Utility/Format.h>

View file

@ -16,6 +16,7 @@
#include <algorithm>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Utility/Path.h>

View file

@ -45,19 +45,18 @@ struct Version {
bool prerelease = false;
long fullVersion = 0;
inline bool operator==(const Version& other) const {
bool operator==(const Version& other) const {
return fullVersion == other.fullVersion && prerelease == other.prerelease;
}
inline bool operator>(const Version& other) const {
bool operator>(const Version& other) const {
if((fullVersion > other.fullVersion) ||
(fullVersion == other.fullVersion && !prerelease && other.prerelease))
{
return true;
}
else {
return false;
}
return false;
}
explicit operator Containers::String() const {