Remove unneeded affectation of default values : already done in the class

declaration.
This commit is contained in:
ocoursiere
2012-10-20 21:58:51 +00:00
parent b2cc13df68
commit bfc2956458
24 changed files with 70 additions and 76 deletions

View File

@@ -47,9 +47,9 @@ BLooper_QuitRequested_hook Looper_QuitRequested_hook;
}
#endif
BPLooper::BPLooper(TPasObject PasObject, const char *name = NULL,
int32 priority = B_NORMAL_PRIORITY,
int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY)
BPLooper::BPLooper(TPasObject PasObject, const char *name,
int32 priority,
int32 portCapacity)
: BLooper(name, priority, portCapacity),
BPHandler(PasObject, name)
// BPasObject(PasObject)

View File

@@ -120,10 +120,10 @@ BPAlert::BPAlert(TPasObject PasObject,
const char *title,
const char *text,
const char *button1,
const char *button2 = NULL,
const char *button3 = NULL,
button_width width = B_WIDTH_AS_USUAL,
alert_type type = B_INFO_ALERT)
const char *button2,
const char *button3,
button_width width,
alert_type type)
: BAlert(title, text, button1, button2, button3, width, type),
BPWindow(PasObject, BRect(), title, B_UNTYPED_WINDOW, 0, 0)
@@ -147,7 +147,7 @@ BPAlert::BPAlert(TPasObject PasObject,
const char *button3,
button_width width,
button_spacing spacing,
alert_type type = B_INFO_ALERT)
alert_type type)
: BAlert(title, text, button1, button2, button3, width, spacing, type),
BPWindow(PasObject, BRect(), title, B_UNTYPED_WINDOW, 0, 0)
// BPLooper(PasObject),

View File

@@ -140,8 +140,8 @@ BPBitmap::BPBitmap(TPasObject PasObject,
BRect bounds,
uint32 flags,
color_space depth,
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
screen_id screenID = B_MAIN_SCREEN_ID)
int32 bytesPerRow,
screen_id screenID)
: BBitmap(bounds, flags, depth, bytesPerRow, screenID),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
@@ -152,8 +152,8 @@ BPBitmap::BPBitmap(TPasObject PasObject,
BPBitmap::BPBitmap(TPasObject PasObject,
BRect bounds,
color_space depth,
bool accepts_views = false,
bool need_contiguous = false)
bool accepts_views,
bool need_contiguous)
: BBitmap(bounds, depth, accepts_views, need_contiguous),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
@@ -163,8 +163,8 @@ BPBitmap::BPBitmap(TPasObject PasObject,
BPBitmap::BPBitmap(TPasObject PasObject,
const BBitmap* source,
bool accepts_views = false,
bool need_contiguous = false)
bool accepts_views,
bool need_contiguous)
: BBitmap(source, accepts_views, need_contiguous),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
@@ -193,7 +193,7 @@ BPBitmap::IsValid(void) const
}
status_t
BPBitmap::LockBits(uint32 *state=NULL)
BPBitmap::LockBits(uint32 *state)
{
return BBitmap::LockBits(state);
}

View File

@@ -105,10 +105,10 @@ private:
BPBox::BPBox(TPasObject PasObject,
BRect bounds,
const char *name = NULL,
uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP,
border_style border = B_FANCY_BORDER)
const char *name,
uint32 resizeFlags,
uint32 flags,
border_style border)
:
BBox(bounds, name, resizeFlags, flags, border),
BPView(PasObject, bounds, name, resizeFlags, flags),

View File

@@ -98,8 +98,8 @@ BPCheckBox::BPCheckBox(TPasObject PasObject,
const char *name,
const char *label,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
uint32 rmask,
uint32 flags)
:
BCheckBox(frame,name,label,
message,rmask,flags),

View File

@@ -72,7 +72,7 @@ BPListItem::BPListItem(TPasObject PasObject,BMessage *data)
{
}
BPListItem::BPListItem(TPasObject PasObject, uint32 outlineLevel = 0, bool expanded = true)
BPListItem::BPListItem(TPasObject PasObject, uint32 outlineLevel, bool expanded)
:BListItem(outlineLevel,expanded),
BPasObject(PasObject)
{
@@ -83,7 +83,7 @@ void BPListItem::Update(BView *owner, const BFont *font)
ListItem_Update_hook(GetPasObject(), &owner, &font);
}
void BPListItem::DrawItem(BView *owner, BRect frame, bool complete = false)
void BPListItem::DrawItem(BView *owner, BRect frame, bool complete)
{
//BListItem::DrawItem(owner, frame, complete);
ListItem_DrawItem_hook(GetPasObject(), &owner, &frame, complete);
@@ -104,7 +104,7 @@ class BPStringItem : public BStringItem , virtual public BPasObject
private:
};
BPStringItem::BPStringItem(TPasObject PasObject,const char *text,uint32 outlineLevel = 0, bool expanded = true)
BPStringItem::BPStringItem(TPasObject PasObject,const char *text,uint32 outlineLevel, bool expanded)
:BStringItem(text,outlineLevel,expanded),
//BPListItem(PasObject,outlineLevel,expanded),
BPasObject(PasObject)
@@ -118,7 +118,7 @@ BPStringItem::BPStringItem(TPasObject PasObject,BMessage *data)
{
}
void BPStringItem::DrawItem(BView *owner, BRect frame, bool complete = false)
void BPStringItem::DrawItem(BView *owner, BRect frame, bool complete)
{
BStringItem::DrawItem(owner, frame, complete);
ListString_DrawItem_hook(GetPasObject(), &owner, &frame, complete);

View File

@@ -51,11 +51,9 @@ BPListView::BPListView(TPasObject PasObject,BMessage *data)
BPListView::BPListView(TPasObject PasObject,BRect frame,
const char *name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS |
B_NAVIGABLE)
list_view_type type,
uint32 resizeMask,
uint32 flags)
:BListView(frame,name,type,resizeMask,flags),
BPView(PasObject, BRect(0,0,0,0), name, 0, flags),
BPHandler(PasObject, name)

View File

@@ -17,7 +17,7 @@
#include "MenuItem.h"
BPMenu::BPMenu(TPasObject PasObject, const char *name, menu_layout layout = B_ITEMS_IN_COLUMN)
BPMenu::BPMenu(TPasObject PasObject, const char *name, menu_layout layout)
:BMenu(name, layout),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject)

View File

@@ -6,8 +6,8 @@
#include <beobj.h>
BPMenuBar::BPMenuBar(TPasObject PasObject, BRect frame, const char *name,
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true)
uint32 resizingMode,
menu_layout layout, bool resizeToFit)
:BMenuBar(frame, name, resizingMode, layout, resizeToFit),
BPMenu(PasObject, name, layout),
// BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),

View File

@@ -29,13 +29,13 @@
#include "menuitem.h"
#include <beobj.h>
BPMenuItem::BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0)
BPMenuItem::BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut, uint32 modifiers)
:BMenuItem(label, message, shortcut, modifiers),
BPasObject(PasObject)
{
}
BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL)
BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message)
:BMenuItem(submenu, message),
BPasObject(PasObject)
{

View File

@@ -82,10 +82,9 @@ BPOutlineListView::BPOutlineListView(TPasObject PasObject,BMessage *data)
BPOutlineListView::BPOutlineListView(TPasObject PasObject,BRect frame,
const char * name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE)
list_view_type type,
uint32 resizeMask,
uint32 flags)
:BOutlineListView(frame,name,type,resizeMask,flags),
BPListView(PasObject, frame,name,type,resizeMask,flags),
// BPView(PasObject, frame,name,resizeMask,flags),

View File

@@ -109,8 +109,8 @@ BPRadioButton::BPRadioButton(TPasObject PasObject,
const char *name,
const char *label,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
uint32 rmask,
uint32 flags)
:
BRadioButton(frame,name,label,
message,rmask,flags),

View File

@@ -41,7 +41,7 @@ class BPScreen : public BScreen, virtual public BPasObject
BPScreen::BPScreen(TPasObject PasObject,screen_id id=B_MAIN_SCREEN_ID )
BPScreen::BPScreen(TPasObject PasObject,screen_id id)
:BScreen(id),
BPasObject(PasObject)

View File

@@ -84,12 +84,11 @@ private:
BPScrollView::BPScrollView(TPasObject PasObject,
const char *name,
BView *target,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = 0,
bool horizontal = false,
bool vertical = false,
border_style border = B_FANCY_BORDER)
uint32 resizeMask,
uint32 flags,
bool horizontal,
bool vertical,
border_style border)
:
BScrollView(name,
target,

View File

@@ -72,8 +72,8 @@ private:
BPStatusBar::BPStatusBar(TPasObject PasObject,
BRect frame,
const char *name,
const char *label = NULL,
const char *trailing_label = NULL)
const char *label,
const char *trailing_label)
:BStatusBar(
frame,
name,

View File

@@ -75,7 +75,7 @@ virtual void DrawLabel(BView* owner, BRect tabFrame);
virtual void DrawTab(BView* owner, BRect tabFrame, tab_position,bool full=true);
};
BPTab::BPTab(TPasObject PasObject,BView* contents=NULL)
BPTab::BPTab(TPasObject PasObject,BView* contents)
: BTab(contents),
BPasObject(PasObject)
{
@@ -149,11 +149,9 @@ private:
};
BPTabView::BPTabView(TPasObject PasObject,BRect frame, const char *name,
button_width width=B_WIDTH_AS_USUAL,
uint32 resizingMode = B_FOLLOW_ALL,
uint32 flags = B_FULL_UPDATE_ON_RESIZE |
B_WILL_DRAW | B_NAVIGABLE_JUMP |
B_FRAME_EVENTS | B_NAVIGABLE)
button_width width,
uint32 resizingMode,
uint32 flags)
:BTabView(frame, name,
width,
resizingMode,

View File

@@ -118,8 +118,8 @@ BPTextControl::BPTextControl(TPasObject PasObject,
const char *label,
const char *initial_text,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
uint32 rmask,
uint32 flags)
:
BTextControl(frame,name,label,initial_text,
message,rmask,flags),

View File

@@ -224,7 +224,7 @@ BPTextView::BPTextView(TPasObject PasObject,
const char *name,
BRect textRect,
uint32 resizeMask,
uint32 flags = B_WILL_DRAW | B_PULSE_NEEDED)
uint32 flags)
:
BTextView( frame,
name,

View File

@@ -43,7 +43,7 @@ BPWindow::BPWindow(TPasObject PasObject,
const char *title,
window_type type,
uint32 flags,
uint32 workspaces = B_CURRENT_WORKSPACE)
uint32 workspaces)
: BWindow(frame, title, type, flags, workspaces),
BPLooper(PasObject)
// BPHandler(PasObject, title),

View File

@@ -51,13 +51,13 @@ BPEntry::BPEntry(TPasObject PasObject)
{
}
BPEntry::BPEntry(TPasObject PasObject,const entry_ref *ref, bool traverse = false)
BPEntry::BPEntry(TPasObject PasObject,const entry_ref *ref, bool traverse)
:BEntry(ref, traverse),
BPasObject(PasObject)
{
}
BPEntry::BPEntry(TPasObject PasObject,const char *path, bool traverse = false)
BPEntry::BPEntry(TPasObject PasObject,const char *path, bool traverse)
:BEntry(path, traverse),
BPasObject(PasObject)
{

View File

@@ -50,15 +50,15 @@ public:
};
BPFilePanel::BPFilePanel(TPasObject PasObject,
file_panel_mode mode = B_OPEN_PANEL,
BMessenger *target = 0,
const entry_ref *start_directory = 0,
uint32 node_flavors = 0,
bool allow_multiple_selection = true,
BMessage *message = 0,
BRefFilter *reg = 0,
bool modal = false,
bool hide_when_done = true)
file_panel_mode mode,
BMessenger *target,
const entry_ref *start_directory,
uint32 node_flavors,
bool allow_multiple_selection,
BMessage *message,
BRefFilter *reg,
bool modal,
bool hide_when_done)
:BFilePanel(mode,target,start_directory,node_flavors,allow_multiple_selection, message, reg,modal, hide_when_done ),
BPasObject(PasObject)
{

View File

@@ -48,8 +48,8 @@ BPPath::BPPath(TPasObject PasObject)
{
}
BPPath::BPPath(TPasObject PasObject,const char *dir, const char *leaf = NULL,
bool normalize = false)
BPPath::BPPath(TPasObject PasObject,const char *dir, const char *leaf,
bool normalize)
:BPath(dir, leaf ,normalize),
BPasObject(PasObject)
{

View File

@@ -44,7 +44,7 @@ BPResources::BPResources(TPasObject PasObject)
BPasObject(PasObject)
{
}
BPResources::BPResources(TPasObject PasObject, const BFile *file, bool truncate = false)
BPResources::BPResources(TPasObject PasObject, const BFile *file, bool truncate)
:BResources(file,truncate),
BPasObject(PasObject)
{

View File

@@ -55,7 +55,7 @@ BPArchivable::~BPArchivable(void)
{
}
status_t BPArchivable::Archive(BMessage *into, bool deep = true) const
status_t BPArchivable::Archive(BMessage *into, bool deep) const
{
if (GetPasObject() != NULL)
{
@@ -69,7 +69,7 @@ status_t BPArchivable::Archive(BMessage *into, bool deep = true) const
}
}
status_t BPArchivable::ArchiveFromPascal(BMessage *into, bool deep = true)
status_t BPArchivable::ArchiveFromPascal(BMessage *into, bool deep)
{
into->AddString("class", "BPArchivable");
return BArchivable::Archive(into, deep);