back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/img_handler.cpp
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2025-07-25 17:04:21 +0300
committerscratko <m@scratko.xyz>2025-07-25 17:46:22 +0300
commit90bd5ca05bea4dbeaaeff5cbe13b5671da420c82 (patch)
tree05757ed9b9ea0c007f4b4e86cfd8402fea4c6a5d /img_handler.cpp
parentac9a06b04144023e87d1a504cfe5598e7cf3d7b4 (diff)
downloadpicture-puzzle-90bd5ca05bea4dbeaaeff5cbe13b5671da420c82.tar.gz
picture-puzzle-90bd5ca05bea4dbeaaeff5cbe13b5671da420c82.tar.bz2
picture-puzzle-90bd5ca05bea4dbeaaeff5cbe13b5671da420c82.zip
July updateHEADmaster
Added const qualifiers is_next_to_empty_box() became visible to other files(). The size of the main window has been changed. Checking whether the A* algorithm has been launched before starting a new game or the same A* algorithm. Fixed indentation in lambda expressions. The initial node is added to open_queue without additional creation of dynamic memory (the address of the object field is taken). Fixed PQ_cont.erase(). IsNearEmptyBox was removed(). EqualNode moved to the Node class.
Diffstat (limited to 'img_handler.cpp')
-rw-r--r--img_handler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/img_handler.cpp b/img_handler.cpp
index 6c62728..f4ded05 100644
--- a/img_handler.cpp
+++ b/img_handler.cpp
@@ -1,5 +1,5 @@
/*
- * Processing of images uploaded by the user
+ * Processing of images uploaded by the user
* (resizing, cropping, saving)
*/
@@ -30,11 +30,11 @@ ImageHandler::ImageHandler(const char *p) : source_path(p) {
std::filesystem::create_directory(res_path);
#if defined(_WIN32)
- auto it = source_path.find_last_of('\\');
+ auto idx = source_path.find_last_of('\\');
#else
- auto it = source_path.find_last_of('/');
+ auto idx = source_path.find_last_of('/');
#endif
- std::string file_name = source_path.substr(it + 1);
+ std::string file_name = source_path.substr(idx + 1);
std::string fn_withot_ext =
file_name.substr(0, file_name.find_first_of('.'));
#if defined(_WIN32)