diff options
author | Jose <jose@zeroc.com> | 2018-07-27 13:55:58 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-07-27 13:55:58 +0200 |
commit | 83b85371785bae2928332ac758f2359b724ef420 (patch) | |
tree | de77474c09aeb5c2038286216578bbc628801734 /cpp/src/slice2cpp/Gen.cpp | |
parent | Fix UWP Build failure (diff) | |
download | ice-83b85371785bae2928332ac758f2359b724ef420.tar.bz2 ice-83b85371785bae2928332ac758f2359b724ef420.tar.xz ice-83b85371785bae2928332ac758f2359b724ef420.zip |
Replace strerror usage with IceUtilInternal::errorToString
Close #154
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c06fd88c76c..e095a71e97e 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include "Gen.h" #include <Slice/Util.h> #include <Slice/CPlusPlusUtil.h> @@ -107,7 +106,7 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt } else { - bool cpp11 = typeContext & TypeContextCpp11; + bool cpp11 = (typeContext & TypeContextCpp11) == TypeContextCpp11; BuiltinPtr bp = BuiltinPtr::dynamicCast(type); if(bp && bp->kind() == Builtin::KindString) { @@ -803,7 +802,7 @@ Slice::Gen::generate(const UnitPtr& p) if(!implH) { ostringstream os; - os << "cannot open `" << fileImplH << "': " << strerror(errno); + os << "cannot open `" << fileImplH << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addFile(fileImplH); @@ -812,7 +811,7 @@ Slice::Gen::generate(const UnitPtr& p) if(!implC) { ostringstream os; - os << "cannot open `" << fileImplC << "': " << strerror(errno); + os << "cannot open `" << fileImplC << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addFile(fileImplC); @@ -840,7 +839,7 @@ Slice::Gen::generate(const UnitPtr& p) if(!H) { ostringstream os; - os << "cannot open `" << fileH << "': " << strerror(errno); + os << "cannot open `" << fileH << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addFile(fileH); @@ -849,7 +848,7 @@ Slice::Gen::generate(const UnitPtr& p) if(!C) { ostringstream os; - os << "cannot open `" << fileC << "': " << strerror(errno); + os << "cannot open `" << fileC << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addFile(fileC); |