@@ -31,8 +31,8 @@ const string MovableMan::m_ClassName = "MovableMan";
31
31
32
32
33
33
// Comparison functor for sorting movable objects by their X position using STL's sort
34
- struct MOXPosComparison :
35
- public std::binary_function<MovableObject *, MovableObject *, bool >
34
+ // TODO: Test to see if not having the binary_function part affects anything. Nothing immediately obvious is wrong without it.
35
+ struct MOXPosComparison // : public std::binary_function<MovableObject *, MovableObject *, bool>
36
36
{
37
37
bool operator ()(MovableObject *pRhs, MovableObject *pLhs) { return pRhs->GetPos ().m_X < pLhs->GetPos ().m_X ; }
38
38
};
@@ -1862,7 +1862,7 @@ void MovableMan::Update()
1862
1862
1863
1863
// DEATH //////////////////////////////////////////////////////////
1864
1864
// Transfer dead actors from Actor list to particle list
1865
- aIt = partition (m_Actors.begin (), m_Actors.end (), std::not1 (std::mem_fun (&Actor::IsDead)));
1865
+ aIt = partition (m_Actors.begin (), m_Actors.end (), std::not_fn (std::mem_fn (&Actor::IsDead)));
1866
1866
amidIt = aIt;
1867
1867
1868
1868
// Move dead Actor to particles list
@@ -1889,7 +1889,7 @@ void MovableMan::Update()
1889
1889
1890
1890
// ITEM SETTLE //////////////////////////////////////////////////////////
1891
1891
// Transfer excess items to particle list - use stable partition, item orde is important
1892
- iIt = stable_partition (m_Items.begin (), m_Items.end (), std::not1 (std::mem_fun (&MovableObject::ToSettle)));
1892
+ iIt = stable_partition (m_Items.begin (), m_Items.end (), std::not_fn (std::mem_fn (&MovableObject::ToSettle)));
1893
1893
imidIt = iIt;
1894
1894
1895
1895
// Move force-settled items to particles list
@@ -1909,7 +1909,7 @@ void MovableMan::Update()
1909
1909
// DELETE //////////////////////////////////////////////////////////
1910
1910
// Only delete after all travels & updates are done
1911
1911
// Actors
1912
- aIt = partition (m_Actors.begin (), m_Actors.end (), std::not1 (std::mem_fun (&MovableObject::ToDelete)));
1912
+ aIt = partition (m_Actors.begin (), m_Actors.end (), std::not_fn (std::mem_fn (&MovableObject::ToDelete)));
1913
1913
amidIt = aIt;
1914
1914
1915
1915
while (aIt != m_Actors.end ())
@@ -1938,15 +1938,15 @@ void MovableMan::Update()
1938
1938
m_Actors.erase (amidIt, m_Actors.end ());
1939
1939
1940
1940
// Items
1941
- iIt = stable_partition (m_Items.begin (), m_Items.end (), std::not1 (std::mem_fun (&MovableObject::ToDelete)));
1941
+ iIt = stable_partition (m_Items.begin (), m_Items.end (), std::not_fn (std::mem_fn (&MovableObject::ToDelete)));
1942
1942
imidIt = iIt;
1943
1943
1944
1944
while (iIt != m_Items.end ())
1945
1945
delete *(iIt++);
1946
1946
m_Items.erase (imidIt, m_Items.end ());
1947
1947
1948
1948
// Particles
1949
- parIt = partition (m_Particles.begin (), m_Particles.end (), std::not1 (std::mem_fun (&MovableObject::ToDelete)));
1949
+ parIt = partition (m_Particles.begin (), m_Particles.end (), std::not_fn (std::mem_fn (&MovableObject::ToDelete)));
1950
1950
midIt = parIt;
1951
1951
1952
1952
while (parIt != m_Particles.end ())
@@ -1958,7 +1958,7 @@ void MovableMan::Update()
1958
1958
// Only settle after all updates and deletions are done
1959
1959
if (m_SettlingEnabled)
1960
1960
{
1961
- parIt = partition (m_Particles.begin (), m_Particles.end (), std::not1 (std::mem_fun (&MovableObject::ToSettle)));
1961
+ parIt = partition (m_Particles.begin (), m_Particles.end (), std::not_fn (std::mem_fn (&MovableObject::ToSettle)));
1962
1962
midIt = parIt;
1963
1963
1964
1964
while (parIt != m_Particles.end ())
0 commit comments