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 #endif
BPLooper::BPLooper(TPasObject PasObject, const char *name = NULL, BPLooper::BPLooper(TPasObject PasObject, const char *name,
int32 priority = B_NORMAL_PRIORITY, int32 priority,
int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY) int32 portCapacity)
: BLooper(name, priority, portCapacity), : BLooper(name, priority, portCapacity),
BPHandler(PasObject, name) BPHandler(PasObject, name)
// BPasObject(PasObject) // BPasObject(PasObject)

View File

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

View File

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

View File

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

View File

@@ -98,8 +98,8 @@ BPCheckBox::BPCheckBox(TPasObject PasObject,
const char *name, const char *name,
const char *label, const char *label,
BMessage *message, BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 rmask,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE) uint32 flags)
: :
BCheckBox(frame,name,label, BCheckBox(frame,name,label,
message,rmask,flags), 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), :BListItem(outlineLevel,expanded),
BPasObject(PasObject) BPasObject(PasObject)
{ {
@@ -83,7 +83,7 @@ void BPListItem::Update(BView *owner, const BFont *font)
ListItem_Update_hook(GetPasObject(), &owner, &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); //BListItem::DrawItem(owner, frame, complete);
ListItem_DrawItem_hook(GetPasObject(), &owner, &frame, complete); ListItem_DrawItem_hook(GetPasObject(), &owner, &frame, complete);
@@ -104,7 +104,7 @@ class BPStringItem : public BStringItem , virtual public BPasObject
private: 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), :BStringItem(text,outlineLevel,expanded),
//BPListItem(PasObject,outlineLevel,expanded), //BPListItem(PasObject,outlineLevel,expanded),
BPasObject(PasObject) 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); BStringItem::DrawItem(owner, frame, complete);
ListString_DrawItem_hook(GetPasObject(), &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, BPListView::BPListView(TPasObject PasObject,BRect frame,
const char *name, const char *name,
list_view_type type = B_SINGLE_SELECTION_LIST, list_view_type type,
uint32 resizeMask = B_FOLLOW_LEFT | uint32 resizeMask,
B_FOLLOW_TOP, uint32 flags)
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS |
B_NAVIGABLE)
:BListView(frame,name,type,resizeMask,flags), :BListView(frame,name,type,resizeMask,flags),
BPView(PasObject, BRect(0,0,0,0), name, 0, flags), BPView(PasObject, BRect(0,0,0,0), name, 0, flags),
BPHandler(PasObject, name) BPHandler(PasObject, name)

View File

@@ -17,7 +17,7 @@
#include "MenuItem.h" #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), :BMenu(name, layout),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0), BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject) BPHandler(PasObject)

View File

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

View File

@@ -29,13 +29,13 @@
#include "menuitem.h" #include "menuitem.h"
#include <beobj.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), :BMenuItem(label, message, shortcut, modifiers),
BPasObject(PasObject) BPasObject(PasObject)
{ {
} }
BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL) BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message)
:BMenuItem(submenu, message), :BMenuItem(submenu, message),
BPasObject(PasObject) BPasObject(PasObject)
{ {

View File

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

View File

@@ -109,8 +109,8 @@ BPRadioButton::BPRadioButton(TPasObject PasObject,
const char *name, const char *name,
const char *label, const char *label,
BMessage *message, BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 rmask,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE) uint32 flags)
: :
BRadioButton(frame,name,label, BRadioButton(frame,name,label,
message,rmask,flags), 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), :BScreen(id),
BPasObject(PasObject) BPasObject(PasObject)

View File

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

View File

@@ -72,8 +72,8 @@ private:
BPStatusBar::BPStatusBar(TPasObject PasObject, BPStatusBar::BPStatusBar(TPasObject PasObject,
BRect frame, BRect frame,
const char *name, const char *name,
const char *label = NULL, const char *label,
const char *trailing_label = NULL) const char *trailing_label)
:BStatusBar( :BStatusBar(
frame, frame,
name, 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); 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), : BTab(contents),
BPasObject(PasObject) BPasObject(PasObject)
{ {
@@ -149,11 +149,9 @@ private:
}; };
BPTabView::BPTabView(TPasObject PasObject,BRect frame, const char *name, BPTabView::BPTabView(TPasObject PasObject,BRect frame, const char *name,
button_width width=B_WIDTH_AS_USUAL, button_width width,
uint32 resizingMode = B_FOLLOW_ALL, uint32 resizingMode,
uint32 flags = B_FULL_UPDATE_ON_RESIZE | uint32 flags)
B_WILL_DRAW | B_NAVIGABLE_JUMP |
B_FRAME_EVENTS | B_NAVIGABLE)
:BTabView(frame, name, :BTabView(frame, name,
width, width,
resizingMode, resizingMode,

View File

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

View File

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

View File

@@ -43,7 +43,7 @@ BPWindow::BPWindow(TPasObject PasObject,
const char *title, const char *title,
window_type type, window_type type,
uint32 flags, uint32 flags,
uint32 workspaces = B_CURRENT_WORKSPACE) uint32 workspaces)
: BWindow(frame, title, type, flags, workspaces), : BWindow(frame, title, type, flags, workspaces),
BPLooper(PasObject) BPLooper(PasObject)
// BPHandler(PasObject, title), // 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), :BEntry(ref, traverse),
BPasObject(PasObject) BPasObject(PasObject)
{ {
} }
BPEntry::BPEntry(TPasObject PasObject,const char *path, bool traverse = false) BPEntry::BPEntry(TPasObject PasObject,const char *path, bool traverse)
:BEntry(path, traverse), :BEntry(path, traverse),
BPasObject(PasObject) BPasObject(PasObject)
{ {

View File

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

View File

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

View File

@@ -44,7 +44,7 @@ BPResources::BPResources(TPasObject PasObject)
BPasObject(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), :BResources(file,truncate),
BPasObject(PasObject) 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) 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"); into->AddString("class", "BPArchivable");
return BArchivable::Archive(into, deep); return BArchivable::Archive(into, deep);