X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBasics%2FBasics_Utils.cxx;h=2f0338f97274c59e673621d32a6b70a1beb1bbc8;hb=d1070d09cfbba6d9b72d8f2ca8d07d23f296686c;hp=15f59842739c6308be81706d76e62ee7d0593884;hpb=29b3ea91e60d94497184a304797a58413f1ec9a8;p=modules%2Fkernel.git diff --git a/src/Basics/Basics_Utils.cxx b/src/Basics/Basics_Utils.cxx index 15f598427..2f0338f97 100644 --- a/src/Basics/Basics_Utils.cxx +++ b/src/Basics/Basics_Utils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,8 @@ #include #endif +#include +#include namespace Kernel_Utils { @@ -144,7 +146,8 @@ namespace Kernel_Utils std::string encode_s(const wchar_t* decoded) { - return std::string(encode(decoded)); + std::unique_ptr> tmp((char *)encode(decoded),[](char *ptr) { delete [] ptr; }); + return std::string(tmp.get()); } #ifndef WIN32 @@ -172,7 +175,7 @@ namespace Kernel_Utils { std::stringstream sstr; sstr<