Skip to content

Commit

Permalink
Minor clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Apr 9, 2022
1 parent 665459b commit 1d6bc3a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/MaterialXCore/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ template <class T> using enable_if_std_vector_t =
template <class T> void stringToData(const string& str, T& data)
{
std::stringstream ss(str);

// Ignore regional settings while streaming data
ss.imbue(std::locale::classic());
if (!(ss >> data))
{
Expand Down Expand Up @@ -97,9 +95,9 @@ template <class T> void stringToData(const string& str, enable_if_std_vector_t<T
template <class T> void dataToString(const T& data, string& str)
{
std::stringstream ss;
ss.imbue(std::locale::classic());

// Set float format and precision for the stream
ss.imbue(std::locale::classic());
const Value::FloatFormat fmt = Value::getFloatFormat();
ss.setf(std::ios_base::fmtflags(
(fmt == Value::FloatFormatFixed ? std::ios_base::fixed :
Expand Down

0 comments on commit 1d6bc3a

Please sign in to comment.