Merge pull request #1333 from gongminmin/master
Remove std functions deprecated by C++11.pull/1337/head
commit
5de0172869
|
@ -266,7 +266,7 @@ void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, co
|
||||||
|
|
||||||
std::copy(out.mMeshes,out.mMeshes+out.mNumMeshes,nind);
|
std::copy(out.mMeshes,out.mMeshes+out.mNumMeshes,nind);
|
||||||
std::transform(out.mMeshes,out.mMeshes+out.mNumMeshes,nind+out.mNumMeshes,
|
std::transform(out.mMeshes,out.mMeshes+out.mNumMeshes,nind+out.mNumMeshes,
|
||||||
std::bind1st(std::plus< unsigned int >(),out.mNumMeshes));
|
[&out](unsigned int n) { return out.mNumMeshes + n; });
|
||||||
|
|
||||||
delete[] out.mMeshes;
|
delete[] out.mMeshes;
|
||||||
out.mMeshes = nind;
|
out.mMeshes = nind;
|
||||||
|
|
|
@ -565,7 +565,7 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id,
|
||||||
temp.push_back((*it).second);
|
temp.push_back((*it).second);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
|
std::sort(temp.begin(), temp.end(), std::mem_fn(&Connection::Compare));
|
||||||
|
|
||||||
return temp; // NRVO should handle this
|
return temp; // NRVO should handle this
|
||||||
}
|
}
|
||||||
|
@ -617,7 +617,7 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
|
||||||
temp.push_back((*it).second);
|
temp.push_back((*it).second);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
|
std::sort(temp.begin(), temp.end(), std::mem_fn(&Connection::Compare));
|
||||||
return temp; // NRVO should handle this
|
return temp; // NRVO should handle this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,7 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
|
||||||
// avoids losing the material if there are more material layers
|
// avoids losing the material if there are more material layers
|
||||||
// coming of which at least one contains actual data (did observe
|
// coming of which at least one contains actual data (did observe
|
||||||
// that with one test file).
|
// that with one test file).
|
||||||
const size_t count_neg = std::count_if(temp_materials.begin(),temp_materials.end(),std::bind2nd(std::less<int>(),0));
|
const size_t count_neg = std::count_if(temp_materials.begin(),temp_materials.end(),[](int n) { return n < 0; });
|
||||||
if(count_neg == temp_materials.size()) {
|
if(count_neg == temp_materials.size()) {
|
||||||
FBXImporter::LogWarn("ignoring dummy material layer (all entries -1)");
|
FBXImporter::LogWarn("ignoring dummy material layer (all entries -1)");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -164,7 +164,7 @@ void AnimResolver::UpdateAnimRangeSetup()
|
||||||
{
|
{
|
||||||
const double start_time = delta - std::fmod(my_first-first,delta);
|
const double start_time = delta - std::fmod(my_first-first,delta);
|
||||||
std::vector<LWO::Key>::iterator n = std::find_if((*it).keys.begin(),(*it).keys.end(),
|
std::vector<LWO::Key>::iterator n = std::find_if((*it).keys.begin(),(*it).keys.end(),
|
||||||
std::bind1st(std::greater<double>(),start_time)),m;
|
[start_time](double t) { return start_time > t; }),m;
|
||||||
|
|
||||||
size_t ofs = 0;
|
size_t ofs = 0;
|
||||||
if (n != (*it).keys.end()) {
|
if (n != (*it).keys.end()) {
|
||||||
|
|
|
@ -91,11 +91,11 @@ static inline std::string &TrimLeft(std::string &s, bool newlines = true)
|
||||||
{
|
{
|
||||||
if (!newlines)
|
if (!newlines)
|
||||||
{
|
{
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpace<char>))));
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpace<char>(c); }));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpaceOrNewLine<char>))));
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpaceOrNewLine<char>(c); }));
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -105,11 +105,11 @@ static inline std::string &TrimRight(std::string &s, bool newlines = true)
|
||||||
{
|
{
|
||||||
if (!newlines)
|
if (!newlines)
|
||||||
{
|
{
|
||||||
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(Assimp::IsSpace<char>))).base(),s.end());
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](char c) { return !Assimp::IsSpace<char>(c); }).base(),s.end());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpaceOrNewLine<char>))));
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpaceOrNewLine<char>(c); }));
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue