[FarGroup/FarManager] master: Compiler warnings & minor cleanup (ce79cecc0)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Nov 10, 2025, 4:30:57 PM (6 days ago) Nov 10
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/ce79cecc0fa5f1688864102bb233822cdf6f2278

>---------------------------------------------------------------

commit ce79cecc0fa5f1688864102bb233822cdf6f2278
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Mon Nov 10 21:19:17 2025 +0000

Compiler warnings & minor cleanup


>---------------------------------------------------------------

ce79cecc0fa5f1688864102bb233822cdf6f2278
far/RegExp.cpp | 11 ++++++++---
far/RegExp.hpp | 8 ++++----
far/changelog | 5 +++++
far/vbuild.m4 | 2 +-
4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/far/RegExp.cpp b/far/RegExp.cpp
index d5d3bd204..b08b5801c 100644
--- a/far/RegExp.cpp
+++ b/far/RegExp.cpp
@@ -47,6 +47,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Common:
#include "common/algorithm.hpp"
#include "common/function_ref.hpp"
+#include "common/from_string.hpp"
#include "common/scope_exit.hpp"
#include "common/string_utils.hpp"

@@ -542,8 +543,12 @@ static string_view get_NamedGroup(string_view src, int& pos, const int shift)
wchar_t c;
do { c = get_next_char(src, pos); } while (ISSPACE(c));
if (!ISALPHA(c))
- if (c && c != close_bracket) throw regex_exception(errSyntax, pos + shift);
- else throw regex_exception(c ? errIncompleteGroupStructure : errBrackets, start_bracket);
+ {
+ if (c && c != close_bracket)
+ throw regex_exception(errSyntax, pos + shift);
+ else
+ throw regex_exception(c? errIncompleteGroupStructure : errBrackets, start_bracket);
+ }

const auto b_pos = pos;
do { c = get_next_char(src, pos); } while (ISWORD(c));
@@ -1080,7 +1085,7 @@ void RegExp::InnerCompile(const wchar_t* src, const int srclength, const int shi
const auto number_mode = ISDIGIT(bref[0]) || bref[0] == L'-';
if (number_mode)
{
- number = std::stoi(std::wstring(bref));
+ number = from_string<int>(bref);
if (number < 0) number = brcount + 1 + number; // -1 == brcount
if (number <= 0 || number > brcount || !closedbrackets[number])
throw regex_exception(errInvalidBackRef, b_pos + shift);
diff --git a/far/RegExp.hpp b/far/RegExp.hpp
index b9794a65c..77443be5a 100644
--- a/far/RegExp.hpp
+++ b/far/RegExp.hpp
@@ -144,7 +144,7 @@ private:
/*! Regular expressions support class.

Expressions must be Compile'ed first,
-and than Match string or Search for matching fragment.
+and then Match string or Search for matching fragment.
*/
class RegExp
{
@@ -179,10 +179,10 @@ private:
string resrc;
#endif

- int CalcLength(string_view src, const int shift);
- void InnerCompile(const wchar_t* src, const int srclength, const int shift, int options);
+ int CalcLength(string_view src, int shift);
+ void InnerCompile(const wchar_t* src, int srclength, int shift, int options);

- bool InnerMatch(const wchar_t*start, const wchar_t* str, const wchar_t* strend, regex_match& RegexMatch, state_stack& Statetack) const;
+ bool InnerMatch(const wchar_t*start, const wchar_t* str, const wchar_t* strend, regex_match& RegexMatch, state_stack& StateStack) const;

void TrimTail(const wchar_t* start, const wchar_t*& strend) const;

diff --git a/far/changelog b/far/changelog
index c1b3bc8df..f8daca6a9 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2025-11-10 21:12:28+00:00 - build 6596
+
+1. Compiler warnings & minor cleanup.
+
--------------------------------------------------------------------------------
w17 2025-11-10 23:52:10+03:00 - build 6595

diff --git a/far/vbuild.m4 b/far/vbuild.m4
index b9a2110c8..7da450404 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6595
+6596


Reply all
Reply to author
Forward
0 new messages