Remove the unnecessary cast for main_t, NULL and argv

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-10-16 01:55:16 +08:00 • committed by Petro Karashchenko
parent d6f787afca
commit b659f0fbdf
100 changed files with 559 additions and 449 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -209,7 +209,7 @@ namespace NXWidgets
virtual inline ~CNxString()
{
delete[] m_text;
m_text = (FAR nxwidget_char_t *)NULL;
m_text = NULL;
};
/**

View file

@ -162,7 +162,7 @@ namespace NXWidgets
inline void detachToolbar(void)
{
m_toolbar = (CNxToolbar *)NULL;
m_toolbar = NULL;
m_toolbarHeight = 0;
}

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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); }

View file

@ -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.

View file

@ -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;
}
}

View file

@ -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.

View file

@ -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.