Commit 3c2f61f6 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix build on FreeBSD/clang

bind1st/bind2nd is removed in C++17
parent 9a3e9e6b
Pipeline #167494 failed with stage
in 6 minutes and 35 seconds
......@@ -3,4 +3,4 @@
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
#- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
......@@ -30,7 +30,7 @@
#include <string.h> // memcpy
#include <algorithm>
#include <functional> // std::bind2nd for gcc 2.9x
#include <functional>
#include <cstdlib>
#include "wvlog.h"
......@@ -921,7 +921,7 @@ S16 PAP::applyPAPSPRM( const U8* ptr, const Style* style, const StyleSheet* styl
std::vector<TabDescriptor>::iterator newEnd = rgdxaTab.end();
for ( U8 i = 0; i < itbdDelMax; ++i ) {
newEnd = std::remove_if ( rgdxaTab.begin(), newEnd,
std::bind2nd( InZone(), Zone( myPtr, i, itbdDelMax ) ) );
std::bind( InZone(), std::placeholders::_2, Zone( myPtr, i, itbdDelMax ) ) );
}
rgdxaTab.erase( newEnd, rgdxaTab.end() ); // really get rid of them
myPtr += itbdDelMax * 4;
......@@ -2092,7 +2092,7 @@ S16 TAP::applyTAPSPRM( const U8* ptr, const Style* style, const StyleSheet* styl
// const S16 dxaNew = readS16( ptr ) - ( rgdxaCenter[ 0 ] + dxaGapHalf );
// std::transform( rgdxaCenter.begin(), rgdxaCenter.end(), rgdxaCenter.begin(),
// std::bind1st( std::plus<S16>(), dxaNew ) );
// std::bind( std::plus<S16>(), std::placeholders::_1, dxaNew ) );
dxaLeft = readS16( ptr );
#ifdef WV2_DEBUG_SPRMS
......@@ -2343,7 +2343,7 @@ S16 TAP::applyTAPSPRM( const U8* ptr, const Style* style, const StyleSheet* styl
// Adjust all successive items (+= ctc * dxaCol)
std::transform( rgdxaCenter.begin() + itcFirst + ctc, rgdxaCenter.end(),
rgdxaCenter.begin() + itcFirst + ctc,
std::bind1st( std::plus<S16>(), ctc * dxaCol ) );
std::bind( std::plus<S16>(), std::placeholders::_1, ctc * dxaCol ) );
}
break;
}
......@@ -2382,7 +2382,7 @@ S16 TAP::applyTAPSPRM( const U8* ptr, const Style* style, const StyleSheet* styl
++itcFirst;
std::transform( rgdxaCenter.begin() + itcFirst, rgdxaCenter.end(),
rgdxaCenter.begin() + itcFirst,
std::bind2nd( std::minus<S16>(), shift ) );
std::bind( std::minus<S16>(), std::placeholders::_2, shift ) );
break;
}
case SPRM::sprmTMerge:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment