SHA256
1
0
forked from pool/kseexpr
Christophe Giboudeaux 2021-06-02 06:05:01 +00:00 committed by Git OBS Bridge
parent 5467a0f322
commit 94834a945b
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From 1e8e6c8da1e22c4d32e50d8999705fd370824736 Mon Sep 17 00:00:00 2001
From: "L. E. Segovia" <amy@amyspark.me>
Date: Tue, 1 Jun 2021 23:35:40 +0000
Subject: [PATCH] Fix charconv support with MSVC/GCC11
BUG: 437890
---
src/KSeExpr/Utils.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/KSeExpr/Utils.cpp b/src/KSeExpr/Utils.cpp
index 22e6cd8..e48cfe9 100644
--- a/src/KSeExpr/Utils.cpp
+++ b/src/KSeExpr/Utils.cpp
@@ -6,6 +6,7 @@
#if defined(KSeExpr_HAVE_CHARCONV_WITH_DOUBLES)
#include <charconv>
+#include <cstring>
double_t KSeExpr::Utils::atof(const char *num)
{
@@ -21,7 +22,7 @@ double_t KSeExpr::Utils::atof(const char *num)
double_t KSeExpr::Utils::atof(const std::string &num)
{
double_t v;
- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v);
+ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v);
if (ec == std::errc()) {
return v;
} else {
@@ -32,7 +33,7 @@ double_t KSeExpr::Utils::atof(const std::string &num)
int32_t KSeExpr::Utils::strtol(const std::string &num)
{
int32_t v;
- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v);
+ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v);
if (ec == std::errc()) {
return v;
} else if (ec == std::errc::result_out_of_range) {
--
2.31.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 2 06:04:23 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add GCC 11 build fix:
* 0001-Fix-charconv-support-with-MSVC-GCC11.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at> Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>

View File

@ -34,6 +34,8 @@ Source0: https://download.kde.org/stable/%{name}/4.0.1/%{name}-%{version}
Patch0: Fix-translation-lookup-in-stock-Linux-deployments.patch Patch0: Fix-translation-lookup-in-stock-Linux-deployments.patch
# PATCH-FIX-OPENSUSE # PATCH-FIX-OPENSUSE
Patch1: Fix-possible-compiler-error.patch Patch1: Fix-possible-compiler-error.patch
# PATCH-FIX-UPSTREAM
Patch2: 0001-Fix-charconv-support-with-MSVC-GCC11.patch
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui) BuildRequires: cmake(Qt5Gui)