Remove usage of some deprecated C++ features

Change-Id: I8faff44ca5fbce9b56ce135ebd070be6bd4c1c78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6799
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
PulkoMandy
2023-08-08 19:52:09 +00:00
committed by Adrien Destugues
parent cc6365c7aa
commit 9c8f4ac5d6
4 changed files with 18 additions and 6 deletions
+10 -2
View File
@@ -103,6 +103,14 @@ PCL6Driver::NextBand(BBitmap* bitmap, BPoint* offset)
{
DBGMSG(("> nextBand\n"));
#if __GNUC__ <= 2
typedef auto_ptr<Rasterizer> RasterizerPointer;
typedef auto_ptr<DeltaRowCompressor> DeltaRowCompressorPointer;
#else
typedef shared_ptr<Rasterizer> RasterizerPointer;
typedef shared_ptr<DeltaRowCompressor> DeltaRowCompressorPointer;
#endif
try {
int y = (int)offset->y;
@@ -118,7 +126,7 @@ PCL6Driver::NextBand(BBitmap* bitmap, BPoint* offset)
} else
rasterizer = new MonochromeRasterizer(fHalftone);
auto_ptr<Rasterizer> _rasterizer(rasterizer);
RasterizerPointer _rasterizer(rasterizer);
bool valid = rasterizer->SetBitmap((int)offset->x, (int)offset->y,
bitmap, GetPageHeight());
@@ -135,7 +143,7 @@ PCL6Driver::NextBand(BBitmap* bitmap, BPoint* offset)
return false;
}
}
auto_ptr<DeltaRowCompressor>_deltaRowCompressor(deltaRowCompressor);
DeltaRowCompressorPointer _deltaRowCompressor(deltaRowCompressor);
int deltaRowSize = 0;
// remember position
+1 -1
View File
@@ -84,7 +84,7 @@ private:
int virtual Compare(const void *key, const void* item) = 0;
};
struct comparator : public binary_function<const void*, const void*, bool>
struct comparator
{
comparator(AbstractPointerListHelper* helper) : helper(helper) {}
+6 -1
View File
@@ -269,7 +269,12 @@ FavoritesMenu::AddNextItem()
// don't add folders that are already in the GoTo section
if (find_if(fUniqueRefCheck.begin(), fUniqueRefCheck.end(),
bind2nd(std::equal_to<entry_ref>(), ref))
#if __GNUC__ <= 2
bind2nd(std::equal_to<entry_ref>(), ref)
#else
[ref](entry_ref compared) { return ref == compared; }
#endif
)
!= fUniqueRefCheck.end()) {
continue;
}
+1 -2
View File
@@ -9548,8 +9548,7 @@ PoseCompareAddWidgetBinder(const BPose* p1, const BPose* p2,
}
struct PoseComparator : public std::binary_function<const BPose*,
const BPose*, bool>
struct PoseComparator
{
PoseComparator(BPoseView* poseView): fPoseView(poseView) { }