summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-01-28 15:57:02 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-01-28 15:57:02 +0100
commitb6cedaabda62066964de227d808060bcf598160c (patch)
treec2e067483ca2b0c94f822cc0c94ee8d529685a14 /src
parent50df44ec3d4569b1c697e6b3545097546622dd2c (diff)
parentb215fe5e498b7e7ea385a2b07797d047a6529a38 (diff)
Merge branch 'main' of https://github.com/dawidg81/minesweeper
Diffstat (limited to 'src')
-rw-r--r--src/Utils/Utils.hpp8
-rw-r--r--src/Utils/catch.cpp (renamed from src/Utils/catchInputInt.cpp)11
-rw-r--r--src/Utils/catchReturn.cpp11
3 files changed, 13 insertions, 17 deletions
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
diff --git a/src/Utils/catchInputInt.cpp b/src/Utils/catch.cpp
index da99833..37ebefe 100644
--- a/src/Utils/catchInputInt.cpp
+++ b/src/Utils/catch.cpp
@@ -1,7 +1,7 @@
#include "Utils.hpp"
-#include <cstdio>
#include <iostream>
+#include <ostream>
int Utils::catchInputInt(int* input){
std::cin >> input;
@@ -12,4 +12,11 @@ int Utils::catchInputInt(int* input){
}
return 0;
-} \ No newline at end of file
+}
+
+int Utils::catchReturn(int renum){
+ if (renum != 0) {
+ std::cout << "Received error signal, sending further" << std::endl;
+ }
+ return 0;
+}
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 <iostream>
-#include <ostream>
-
-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