From 4aefcb5cc29751ffbbf9c1ba505889f9aead8c05 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 5 Oct 2022 21:47:47 +0200 Subject: [PATCH] Base: fix build failure with MSVC --- src/Base/Builder3D.cpp | 6 ++++-- src/Base/Builder3D.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Base/Builder3D.cpp b/src/Base/Builder3D.cpp index 62435301d6..dc1a375152 100644 --- a/src/Base/Builder3D.cpp +++ b/src/Base/Builder3D.cpp @@ -1119,7 +1119,7 @@ bool InventorLoader::isValid() const } namespace Base { -Vector3f to_vector(std::string str) +BaseExport Vector3f to_vector(std::string str) { std::string_view view = str; if (!boost::starts_with(view, "(") || !boost::ends_with(str, ")")) @@ -1128,8 +1128,10 @@ Vector3f to_vector(std::string str) view.remove_prefix(1); view.remove_suffix(1); + str = view; + boost::char_separator sep(" ,"); - boost::tokenizer > tokens(view, sep); + boost::tokenizer > tokens(str, sep); std::vector token_results; token_results.assign(tokens.begin(), tokens.end()); diff --git a/src/Base/Builder3D.h b/src/Base/Builder3D.h index f9d5664640..06f5848e60 100644 --- a/src/Base/Builder3D.h +++ b/src/Base/Builder3D.h @@ -407,7 +407,7 @@ private: * If it fails then a std::exception is thrown. * Supported type names are float or double */ -Base::Vector3f to_vector(std::string); +BaseExport Base::Vector3f to_vector(std::string); } //namespace Base