From f39ef11a0798786861a06bd7e6871e06f78dc7ba Mon Sep 17 00:00:00 2001 From: Langning Chen Date: Sat, 23 Dec 2023 20:18:32 +0800 Subject: [PATCH] Update build artifact path and add C++ standard library headers --- .github/workflows/cmake-single-platform.yml | 2 +- .vscode/settings.json | 42 ++++++++++++++++++++- main.cpp | 8 ++-- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 9310a6d..e61618f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -19,4 +19,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: build - path: ${{github.workspace}}\build\MultiRename.exe \ No newline at end of file + path: ${{github.workspace}}\build\Release\MultiRename.exe \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 22c7b9d..507e58a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -50,6 +50,46 @@ "ctime": "cpp", "ratio": "cpp", "iomanip": "cpp", - "sstream": "cpp" + "sstream": "cpp", + "any": "cpp", + "barrier": "cpp", + "bitset": "cpp", + "cfenv": "cpp", + "charconv": "cpp", + "chrono": "cpp", + "cinttypes": "cpp", + "complex": "cpp", + "condition_variable": "cpp", + "coroutine": "cpp", + "csetjmp": "cpp", + "csignal": "cpp", + "cstring": "cpp", + "cuchar": "cpp", + "forward_list": "cpp", + "list": "cpp", + "map": "cpp", + "unordered_set": "cpp", + "expected": "cpp", + "regex": "cpp", + "source_location": "cpp", + "format": "cpp", + "fstream": "cpp", + "future": "cpp", + "latch": "cpp", + "mutex": "cpp", + "ranges": "cpp", + "scoped_allocator": "cpp", + "semaphore": "cpp", + "shared_mutex": "cpp", + "span": "cpp", + "spanstream": "cpp", + "stacktrace": "cpp", + "stdfloat": "cpp", + "stop_token": "cpp", + "syncstream": "cpp", + "thread": "cpp", + "typeindex": "cpp", + "valarray": "cpp", + "variant": "cpp" } } \ No newline at end of file diff --git a/main.cpp b/main.cpp index 1b69f74..aa56d5c 100644 --- a/main.cpp +++ b/main.cpp @@ -365,17 +365,17 @@ std::string ProceedRename(const FILE_INFO &File) int a = std::stoi(Addison) - 1; int b = std::stoi(Addison.substr(Addison.find('~') + 1)) - 1; if (a < 0) - a = Value.length() + a + 1; + a = (int)Value.length() + a + 1; else if (a == 0) a = 1; else if (a > (int)Value.length()) - a = Value.length(); + a = (int)Value.length(); if (b < 0) - b = Value.length() + b + 1; + b = (int)Value.length() + b + 1; else if (b == 0) b = 1; else if (b > (int)Value.length()) - b = Value.length(); + b = (int)Value.length(); if (a > b) std::swap(a, b); Value = Value.substr(a, b - a + 1);