From 907ebb94c26da0f0b5acc9ac12d12e683634d8f6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 Mar 2023 08:38:41 +0800 Subject: [PATCH] Fix 3ds Max plugin build under C++17 --- nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp b/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp index 00304a5474..ca5710e4ea 100644 --- a/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp +++ b/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp @@ -2230,8 +2230,11 @@ void CSSSBuild::compile(NL3D::CAnimation &dest, const char* sBaseName) std::string &line= lines[k]; // remove any '\r' - line.resize( std::remove_if(line.begin(), line.end(), std::bind2nd(std::equal_to(), '\r') ) - - line.begin() ); +#ifndef NL_CPP17 + line.resize(std::remove_if(line.begin(), line.end(), std::bind2nd(std::equal_to(), '\r')) - line.begin()); +#else + line.resize(std::remove_if(line.begin(), line.end(), std::bind(std::equal_to(), std::placeholders::_1, '\r')) - line.begin()); +#endif // parse static std::vector words;