From f34e07b4962f65362afa5ca98759e87929d964bc Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Tue, 27 Jan 2026 19:19:30 +0100 Subject: file node --- src/Utils/catch.cpp | 22 ++++++++++++++++++++++ src/Utils/catchInputInt.cpp | 15 --------------- src/Utils/catchReturn.cpp | 11 ----------- 3 files changed, 22 insertions(+), 26 deletions(-) create mode 100644 src/Utils/catch.cpp delete mode 100644 src/Utils/catchInputInt.cpp delete mode 100644 src/Utils/catchReturn.cpp (limited to 'src') diff --git a/src/Utils/catch.cpp b/src/Utils/catch.cpp new file mode 100644 index 0000000..37ebefe --- /dev/null +++ b/src/Utils/catch.cpp @@ -0,0 +1,22 @@ +#include "Utils.hpp" + +#include +#include + +int Utils::catchInputInt(int* input){ + std::cin >> input; + + if (std::cin.fail()) { + std::cout << "error: Input failed" << std::endl; + return 1; + } + + return 0; +} + +int Utils::catchReturn(int renum){ + if (renum != 0) { + std::cout << "Received error signal, sending further" << std::endl; + } + return 0; +} diff --git a/src/Utils/catchInputInt.cpp b/src/Utils/catchInputInt.cpp deleted file mode 100644 index da99833..0000000 --- a/src/Utils/catchInputInt.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "Utils.hpp" - -#include -#include - -int Utils::catchInputInt(int* input){ - std::cin >> input; - - if (std::cin.fail()) { - std::cout << "error: Input failed" << std::endl; - return 1; - } - - return 0; -} \ No newline at end of file diff --git a/src/Utils/catchReturn.cpp b/src/Utils/catchReturn.cpp deleted file mode 100644 index c3d6722..0000000 --- a/src/Utils/catchReturn.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "Utils.hpp" - -#include -#include - -int Utils::catchReturn(int renum){ - if (renum != 0) { - std::cout << "Received error signal, sending further" << std::endl; - } - return 0; -} \ No newline at end of file -- cgit v1.2.3 From ba3e61ec2b49d6ad8690482f825c4dda9eb7000c Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Wed, 28 Jan 2026 11:29:27 +0100 Subject: Experimental build script --- build.sh | 3 +++ src/Utils/Utils.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100755 build.sh (limited to 'src') diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..47ccdaa --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +g++ -c src/* +g++ *.o -o minesweeper +rm *.o diff --git a/src/Utils/Utils.hpp b/src/Utils/Utils.hpp index a60a64d..e977db4 100644 --- a/src/Utils/Utils.hpp +++ b/src/Utils/Utils.hpp @@ -3,9 +3,9 @@ #ifndef UTILS_HPP class Utils{ - public: - int catchInputInt(int* input); - int catchReturn(int renum); + public: + int catchInputInt(int* input); + int catchReturn(int renum); }; -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 293f87458bdaa9f6d71778d6dbeca893e506ca35 Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Wed, 28 Jan 2026 11:31:43 +0100 Subject: Removed build script --- build.sh | 3 --- src/Game/Game.hpp.pch | Bin 0 -> 822528 bytes src/Utils/Utils.hpp.pch | Bin 0 -> 10271632 bytes 3 files changed, 3 deletions(-) delete mode 100755 build.sh create mode 100644 src/Game/Game.hpp.pch create mode 100644 src/Utils/Utils.hpp.pch (limited to 'src') diff --git a/build.sh b/build.sh deleted file mode 100755 index 47ccdaa..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -g++ -c src/* -g++ *.o -o minesweeper -rm *.o diff --git a/src/Game/Game.hpp.pch b/src/Game/Game.hpp.pch new file mode 100644 index 0000000..b25ccb7 Binary files /dev/null and b/src/Game/Game.hpp.pch differ diff --git a/src/Utils/Utils.hpp.pch b/src/Utils/Utils.hpp.pch new file mode 100644 index 0000000..095973a Binary files /dev/null and b/src/Utils/Utils.hpp.pch differ -- cgit v1.2.3 From 0a11fc4c6a75aa9971a7a92acec06eab7c510ebd Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Wed, 28 Jan 2026 11:32:27 +0100 Subject: Removed .pch files --- src/Game/Game.hpp.pch | Bin 822528 -> 0 bytes src/Utils/Utils.hpp.pch | Bin 10271632 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/Game/Game.hpp.pch delete mode 100644 src/Utils/Utils.hpp.pch (limited to 'src') diff --git a/src/Game/Game.hpp.pch b/src/Game/Game.hpp.pch deleted file mode 100644 index b25ccb7..0000000 Binary files a/src/Game/Game.hpp.pch and /dev/null differ diff --git a/src/Utils/Utils.hpp.pch b/src/Utils/Utils.hpp.pch deleted file mode 100644 index 095973a..0000000 Binary files a/src/Utils/Utils.hpp.pch and /dev/null differ -- cgit v1.2.3