ecl-containers: fix gcc7.1 compilation issue

This commit resolves #520

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
This commit is contained in:
Dmitry Rozhkov 2017-06-26 17:25:51 +03:00
parent c255bc3dc8
commit 4f863ffa54
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From 8f40c9b006c70326bcfca73daebb54187a65aa5e Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Date: Mon, 26 Jun 2017 17:05:01 +0300
Subject: [PATCH] [ecl_containers] Fix gcc v7.1 compilation issue
When built with gcc v7.1 compilation fails with an error message
about using an expression as a function when updating
the private attribute FloatContainerFormatter.prm_width.
The patch uses assignment to update the attribute.
Upstream-Status: Accepted [https://github.com/stonier/ecl_core/pull/58]
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
---
ecl_containers/include/ecl/containers/common/formatters.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ecl_containers/include/ecl/containers/common/formatters.hpp b/ecl_containers/include/ecl/containers/common/formatters.hpp
index e26ec60..5f4c026 100644
--- a/ecl_containers/include/ecl/containers/common/formatters.hpp
+++ b/ecl_containers/include/ecl/containers/common/formatters.hpp
@@ -123,7 +123,7 @@ class ECL_LOCAL FloatContainerFormatter {
* @param w : the width to use for the inserted float.
* @return FloatContainerFormatter& : this formatter readied for use with a stream.
*/
- FloatContainerFormatter& operator()(const unsigned int p, const int w) { format.precision(p); prm_width(w); return *this; } // Permanent
+ FloatContainerFormatter& operator()(const unsigned int p, const int w) { format.precision(p); prm_width = w; return *this; } // Permanent
/**
* Convenient stream formatter. This function directly readies the formatter
* with the specified container and the stored (permanent) settings.
--
2.9.3

View File

@ -6,3 +6,5 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=14;endline=14;md5=d566ef916e9de
DEPENDS = "ecl-license ecl-config ecl-errors ecl-exceptions ecl-formatters ecl-converters ecl-mpl ecl-type-traits ecl-utilities"
require ecl-core.inc
SRC_URI += "file://0001-ecl_containers-Fix-gcc-v7.1-compilation-issue.patch;patchdir=.."