mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-06 21:55:13 +00:00
Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d6f787afca
commit
b659f0fbdf
100 changed files with 559 additions and 449 deletions
|
|
@ -215,7 +215,7 @@ namespace NXWidgets
|
|||
|
||||
CButton(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height, const CNxString &text,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CButton Destructor.
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
uint8_t buttonColumns, uint8_t buttonRows,
|
||||
nxgl_coord_t buttonWidth, nxgl_coord_t buttonHeight,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CButtonArray Destructor.
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ namespace NXWidgets
|
|||
|
||||
CCheckBox(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ namespace NXWidgets
|
|||
CCycleButton(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t bitmapX, nxgl_coord_t bitmapY,
|
||||
FAR const struct SBitmap *normalGlyph,
|
||||
FAR const struct SBitmap *clickedGlyph,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace NXWidgets
|
|||
|
||||
CImage(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height, FAR IBitmap *bitmap,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace NXWidgets
|
|||
CKeypad(CWidgetControl *pWidgetControl, NXHANDLE hNxServer,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CKeypad Destructor.
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ namespace NXWidgets
|
|||
|
||||
CLabel(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height, const CNxString &text,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
const CNxString &text,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
uint8_t buttonColumns, uint8_t buttonRows,
|
||||
nxgl_coord_t buttonWidth, nxgl_coord_t buttonHeight,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CLatchButtonArray Destructor.
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ namespace NXWidgets
|
|||
CListBox(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ namespace NXWidgets
|
|||
inline virtual ~CMultiLineTextBox(void)
|
||||
{
|
||||
delete m_text;
|
||||
m_text = (CText *)NULL;
|
||||
m_text = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -422,7 +422,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
const CNxString &text, uint32_t flags,
|
||||
nxgl_coord_t maxRows = 0,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Set the horizontal alignment of text within the textbox.
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ namespace NXWidgets
|
|||
|
||||
CNumericEdit(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ namespace NXWidgets
|
|||
virtual inline ~CNxString()
|
||||
{
|
||||
delete[] m_text;
|
||||
m_text = (FAR nxwidget_char_t *)NULL;
|
||||
m_text = NULL;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ namespace NXWidgets
|
|||
|
||||
inline void detachToolbar(void)
|
||||
{
|
||||
m_toolbar = (CNxToolbar *)NULL;
|
||||
m_toolbar = NULL;
|
||||
m_toolbarHeight = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
uint32_t flags,
|
||||
FAR const CWidgetStyle *style = (FAR const CWidgetStyle *)NULL);
|
||||
FAR const CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ namespace NXWidgets
|
|||
CRadioButton(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Get the current state of the radio button.
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace NXWidgets
|
|||
|
||||
CRadioButtonGroup(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ namespace NXWidgets
|
|||
CScrollbarHorizontal(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
uint32_t flags,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Scroll the panel by the specified amounts.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ namespace NXWidgets
|
|||
CScrollbarVertical(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ namespace NXWidgets
|
|||
CScrollingListBox(CWidgetControl *pWidgetControl,
|
||||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Add a new option to the widget using default colors.
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
uint32_t flags,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Scroll the panel by the specified amounts.
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
const CNxString &text, uint32_t flags,
|
||||
nxgl_coord_t maxRows = 0,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Set the horizontal alignment of text within the textbox.
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
const CNxString &text,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
uint8_t buttonColumns, uint8_t buttonRows,
|
||||
nxgl_coord_t buttonWidth, nxgl_coord_t buttonHeight,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CStickyButtonArray Destructor.
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ namespace NXWidgets
|
|||
|
||||
CStickyImage(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height, FAR IBitmap *bitmap,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace NXWidgets
|
|||
nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height,
|
||||
nxgl_coord_t buttonHeight,
|
||||
FAR const CWidgetStyle *style = (FAR const CWidgetStyle *)NULL
|
||||
FAR const CWidgetStyle *style = NULL
|
||||
);
|
||||
|
||||
inline CNxWidget &page(uint8_t index) { return *m_tabpages.at(index); }
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ namespace NXWidgets
|
|||
|
||||
CTextBox(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,
|
||||
nxgl_coord_t width, nxgl_coord_t height, const CNxString &text,
|
||||
CWidgetStyle *style = (CWidgetStyle *)NULL);
|
||||
CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Sets the cursor display mode.
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ namespace NXWidgets
|
|||
* values stored in the defaultCWidgetStyle object.
|
||||
*/
|
||||
|
||||
CWidgetControl(FAR const CWidgetStyle *style = (const CWidgetStyle *)NULL);
|
||||
CWidgetControl(FAR const CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
|
@ -420,7 +420,7 @@ namespace NXWidgets
|
|||
* @return True means some interesting event occurred
|
||||
*/
|
||||
|
||||
bool pollEvents(CNxWidget *widget = (CNxWidget *)NULL);
|
||||
bool pollEvents(CNxWidget *widget = NULL);
|
||||
|
||||
/**
|
||||
* Swaps the depth of the supplied widget.
|
||||
|
|
@ -509,7 +509,7 @@ namespace NXWidgets
|
|||
{
|
||||
if (widget == m_focusedWidget)
|
||||
{
|
||||
m_focusedWidget = (CNxWidget *)NULL;
|
||||
m_focusedWidget = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,7 @@ namespace NxWM
|
|||
* values stored in the defaultCWidgetStyle object.
|
||||
*/
|
||||
|
||||
CWindowMessenger(FAR const NXWidgets::CWidgetStyle *style =
|
||||
(const NXWidgets::CWidgetStyle *)NULL);
|
||||
CWindowMessenger(FAR const NXWidgets::CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CWindowMessenger Destructor.
|
||||
|
|
|
|||
|
|
@ -215,8 +215,7 @@ namespace Twm4Nx
|
|||
|
||||
CWindowEvent(FAR CTwm4Nx *twm4nx, FAR void *client,
|
||||
FAR const struct SAppEvents &events,
|
||||
FAR const NXWidgets::CWidgetStyle *style =
|
||||
(const NXWidgets::CWidgetStyle *)NULL);
|
||||
FAR const NXWidgets::CWidgetStyle *style = NULL);
|
||||
|
||||
/**
|
||||
* CWindowEvent Destructor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue