From e02cce3fde370bc63a5bce0656abfd65406a32ab Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 21 Oct 2019 07:58:30 +0200 Subject: [PATCH] Use pass by value in string to double conversion --- src/opm/io/eclipse/EclFile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/opm/io/eclipse/EclFile.cpp b/src/opm/io/eclipse/EclFile.cpp index 7d53aa295..4389939f2 100644 --- a/src/opm/io/eclipse/EclFile.cpp +++ b/src/opm/io/eclipse/EclFile.cpp @@ -429,9 +429,8 @@ std::vector readFormattedLogiArray(const std::string& file_str, const int std::vector readFormattedDoubArray(const std::string& file_str, const int size, long int fromPos) { - std::function f = [](const std::string& value) + std::function f = [](std::string val) { - std::string val(value); int p1 = val.find_first_of("D"); if (p1 == -1) {