GCC 4 fixes by Ingo Weinhold.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -857,7 +857,8 @@ TBarView::SendDragMessage(const char *signature, entry_ref *ref)
|
||||
// can toss it after send
|
||||
err = mess.SendMessage(fDragMessage);
|
||||
} else if (ref) {
|
||||
FSLaunchItem(ref, fDragMessage, true, true);
|
||||
FSLaunchItem((const entry_ref*)ref, (const BMessage*)fDragMessage,
|
||||
true, true);
|
||||
} else if (signature && strlen(signature) > 0) {
|
||||
roster.Launch(signature, fDragMessage);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ All rights reserved.
|
||||
#include "TimeView.h"
|
||||
#include "BarApp.h"
|
||||
|
||||
using std::max;
|
||||
|
||||
#ifdef DB_ADDONS
|
||||
// Add-on support
|
||||
|
||||
@@ -70,6 +70,8 @@ struct DeskbarItemInfo {
|
||||
};
|
||||
#endif
|
||||
|
||||
class TReplicantShelf;
|
||||
|
||||
class TReplicantTray : public BView {
|
||||
public:
|
||||
TReplicantTray(TBarView *bv, bool vertical);
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (function)(p1.Pass()); }
|
||||
{ FunctionObjectWithResult<Result>::result = (function)(p1.Pass()); }
|
||||
|
||||
private:
|
||||
Result (*function)(Param1);
|
||||
@@ -258,7 +258,8 @@ public:
|
||||
}
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (function)(p1.Pass(), p2.Pass(), p3.Pass()); }
|
||||
{ FunctionObjectWithResult<Result>::result
|
||||
= (function)(p1.Pass(), p2.Pass(), p3.Pass()); }
|
||||
|
||||
private:
|
||||
Result (*function)(Param1, Param2, Param3);
|
||||
@@ -305,7 +306,8 @@ public:
|
||||
}
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (function)(p1.Pass(), p2.Pass(), p3.Pass(), p4.Pass()); }
|
||||
{ FunctionObjectWithResult<Result>::result
|
||||
= (function)(p1.Pass(), p2.Pass(), p3.Pass(), p4.Pass()); }
|
||||
|
||||
private:
|
||||
Result (*function)(Param1, Param2, Param3, Param4);
|
||||
@@ -365,7 +367,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (target->*function)(); }
|
||||
{ FunctionObjectWithResult<R>::result = (target->*function)(); }
|
||||
|
||||
|
||||
private:
|
||||
@@ -428,7 +430,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (target->*function)(p1.Pass()); }
|
||||
{ FunctionObjectWithResult<R>::result = (target->*function)(p1.Pass()); }
|
||||
|
||||
protected:
|
||||
R (T::*function)(Param1);
|
||||
@@ -449,7 +451,8 @@ public:
|
||||
}
|
||||
|
||||
virtual void operator()()
|
||||
{ result = (target->*function)(p1.Pass(), p2.Pass()); }
|
||||
{ FunctionObjectWithResult<R>::result
|
||||
= (target->*function)(p1.Pass(), p2.Pass()); }
|
||||
|
||||
protected:
|
||||
R (T::*function)(Param1, Param2);
|
||||
|
||||
@@ -148,63 +148,6 @@ class BPose {
|
||||
};
|
||||
|
||||
|
||||
template<class Param1>
|
||||
void
|
||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *, Param1), Param1 p1)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget)
|
||||
(func)(widget, pose, poseView, column, p1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Param1, class Param2>
|
||||
void
|
||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||
Param1, Param2), Param1 p1, Param2 p2)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget)
|
||||
(func)(widget, pose, poseView, column, p1, p2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Result, class Param1, class Param2>
|
||||
Result
|
||||
WhileEachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
Result (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||
Param1, Param2), Param1 p1, Param2 p2)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget) {
|
||||
Result result = (func)(widget, pose, poseView, column, p1, p2);
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
inline Model *
|
||||
BPose::TargetModel() const
|
||||
{
|
||||
|
||||
@@ -39,13 +39,13 @@ All rights reserved.
|
||||
#define _POSE_LIST_H
|
||||
|
||||
#include "ObjectList.h"
|
||||
#include "Pose.h"
|
||||
|
||||
struct node_ref;
|
||||
struct entry_ref;
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
class BPose;
|
||||
class Model;
|
||||
|
||||
class PoseList : public BObjectList<BPose> {
|
||||
|
||||
@@ -46,7 +46,6 @@ All rights reserved.
|
||||
#include "ContainerWindow.h"
|
||||
#include "Model.h"
|
||||
#include "PendingNodeMonitorCache.h"
|
||||
#include "Pose.h"
|
||||
#include "PoseList.h"
|
||||
#include "TitleView.h"
|
||||
#include "Utilities.h"
|
||||
@@ -73,6 +72,7 @@ class BContainerWindow;
|
||||
class BHScrollBar;
|
||||
class EntryListBase;
|
||||
|
||||
|
||||
const int32 kSmallStep = 10;
|
||||
const int32 kListOffset = 20;
|
||||
|
||||
@@ -1001,6 +1001,63 @@ BPoseView::FindPose(const entry_ref *entry, int32 *index) const
|
||||
}
|
||||
|
||||
|
||||
template<class Param1>
|
||||
void
|
||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *, Param1), Param1 p1)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget)
|
||||
(func)(widget, pose, poseView, column, p1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Param1, class Param2>
|
||||
void
|
||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||
Param1, Param2), Param1 p1, Param2 p2)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget)
|
||||
(func)(widget, pose, poseView, column, p1, p2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Result, class Param1, class Param2>
|
||||
Result
|
||||
WhileEachTextWidget(BPose *pose, BPoseView *poseView,
|
||||
Result (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||
Param1, Param2), Param1 p1, Param2 p2)
|
||||
{
|
||||
for (int32 index = 0; ;index++) {
|
||||
BColumn *column = poseView->ColumnAt(index);
|
||||
if (!column)
|
||||
break;
|
||||
|
||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||
if (widget) {
|
||||
Result result = (func)(widget, pose, poseView, column, p1, p2);
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
using namespace BPrivate;
|
||||
|
||||
@@ -215,7 +215,7 @@ template<class T>
|
||||
void
|
||||
LaunchInNewThread(const char *name, int32 priority, status_t (T::*function)(), T *onThis)
|
||||
{
|
||||
Thread::Launch(new SimpleMemberFunctionObjectWorkaround<T>(func, onThis),
|
||||
Thread::Launch(new SimpleMemberFunctionObjectWorkaround<T>(function, onThis),
|
||||
priority, name);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class TTrackerState : public Settings {
|
||||
~TTrackerState();
|
||||
|
||||
private:
|
||||
friend TrackerSettings;
|
||||
friend class BPrivate::TrackerSettings;
|
||||
|
||||
static void InitIfNeeded();
|
||||
TTrackerState(const TTrackerState&);
|
||||
|
||||
@@ -1067,7 +1067,7 @@ StringToScalar(const char *text)
|
||||
return val;
|
||||
}
|
||||
|
||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI
|
||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI && !defined(__HAIKU__)
|
||||
|
||||
bool
|
||||
operator==(const rgb_color &a, const rgb_color &b)
|
||||
|
||||
@@ -424,7 +424,7 @@ extern void DeleteSubmenu(BMenuItem *submenuItem);
|
||||
extern bool BootedInSafeMode();
|
||||
|
||||
// Now is in kits
|
||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI
|
||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI && !defined(__HAIKU__)
|
||||
|
||||
// Should be in kits
|
||||
bool operator==(const rgb_color &, const rgb_color &);
|
||||
|
||||
Reference in New Issue
Block a user