From a771da5623953a332ed66cfa8501de5df73a1820 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 2 Oct 2019 00:54:14 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20void=20for=20functions=20?= =?UTF-8?q?without=20arguments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/wx/generic/helpext.h | 8 ++-- include/wx/helpbase.h | 2 +- include/wx/image.h | 2 +- include/wx/matrix.h | 12 +++--- include/wx/msw/joystick.h | 80 ++++++++++++++++++------------------ include/wx/msw/taskbar.h | 2 +- include/wx/sckipc.h | 2 +- interface/wx/object.h | 4 +- interface/wx/thread.h | 2 +- src/common/dcgraph.cpp | 6 +-- src/common/ftp.cpp | 2 +- src/common/http.cpp | 4 +- src/common/longlong.cpp | 4 +- src/common/matrix.cpp | 6 +-- src/common/memory.cpp | 10 ++--- src/common/time.cpp | 2 +- src/common/valgen.cpp | 4 +- src/generic/dcpsg.cpp | 2 +- src/msw/gdiobj.cpp | 4 +- src/msw/helpwin.cpp | 4 +- src/msw/scrolbar.cpp | 4 +- 21 files changed, 83 insertions(+), 83 deletions(-) diff --git a/include/wx/generic/helpext.h b/include/wx/generic/helpext.h index b713cd854a..67d5294c7f 100644 --- a/include/wx/generic/helpext.h +++ b/include/wx/generic/helpext.h @@ -44,15 +44,15 @@ public: virtual bool Initialize(const wxString& dir) wxOVERRIDE; virtual bool LoadFile(const wxString& file = wxEmptyString) wxOVERRIDE; - virtual bool DisplayContents(void) wxOVERRIDE; + virtual bool DisplayContents() wxOVERRIDE; virtual bool DisplaySection(int sectionNo) wxOVERRIDE; virtual bool DisplaySection(const wxString& section) wxOVERRIDE; virtual bool DisplayBlock(long blockNo) wxOVERRIDE; virtual bool KeywordSearch(const wxString& k, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) wxOVERRIDE; - virtual bool Quit(void) wxOVERRIDE; - virtual void OnQuit(void) wxOVERRIDE; + virtual bool Quit() wxOVERRIDE; + virtual void OnQuit() wxOVERRIDE; virtual bool DisplayHelp(const wxString &) ; @@ -88,7 +88,7 @@ private: bool ParseMapFileLine(const wxString& line); // Deletes the list and all objects. - void DeleteList(void); + void DeleteList(); // How to call the html viewer. diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index f3cb199de4..4ff7aa73ba 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -50,7 +50,7 @@ public: virtual bool LoadFile(const wxString& file = wxEmptyString) = 0; // Displays the contents - virtual bool DisplayContents(void) = 0; + virtual bool DisplayContents() = 0; // Display the given section virtual bool DisplaySection(int sectionNo) = 0; diff --git a/include/wx/image.h b/include/wx/image.h index c7e7a87e82..3a07bc77cf 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -360,7 +360,7 @@ public: // Convert to greyscale image. Uses the luminance component (Y) of the image. // The luma value (YUV) is calculated using (R * weight_r) + (G * weight_g) + (B * weight_b), defaults to ITU-T BT.601 wxImage ConvertToGreyscale(double weight_r, double weight_g, double weight_b) const; - wxImage ConvertToGreyscale(void) const; + wxImage ConvertToGreyscale() const; // convert to monochrome image ( will be replaced by white, // everything else by black) diff --git a/include/wx/matrix.h b/include/wx/matrix.h index 859c2a28d1..b45473e3ee 100644 --- a/include/wx/matrix.h +++ b/include/wx/matrix.h @@ -34,7 +34,7 @@ class WXDLLIMPEXP_CORE wxTransformMatrix: public wxObject { public: - wxTransformMatrix(void); + wxTransformMatrix(); wxTransformMatrix(const wxTransformMatrix& mat); //get the value in the matrix at col,row @@ -85,18 +85,18 @@ public: double operator()(int col, int row) const; // Invert matrix - bool Invert(void); + bool Invert(); // Make into identity matrix - bool Identity(void); + bool Identity(); // Is the matrix the identity matrix? // Only returns a flag, which is set whenever an operation // is done. - inline bool IsIdentity(void) const { return m_isIdentity; } + inline bool IsIdentity() const { return m_isIdentity; } // This does an actual check. - inline bool IsIdentity1(void) const ; + inline bool IsIdentity1() const ; //Scale by scale (isotropic scaling i.e. the same in x and y): //!ex: @@ -211,7 +211,7 @@ inline double wxTransformMatrix::TransformY(double y) const // Is the matrix the identity matrix? // Each operation checks whether the result is still the identity matrix and sets a flag. -inline bool wxTransformMatrix::IsIdentity1(void) const +inline bool wxTransformMatrix::IsIdentity1() const { return ( wxIsSameDouble(m_matrix[0][0], 1.0) && diff --git a/include/wx/msw/joystick.h b/include/wx/msw/joystick.h index bd5fdbf5b4..6bcfa7b9e2 100644 --- a/include/wx/msw/joystick.h +++ b/include/wx/msw/joystick.h @@ -29,54 +29,54 @@ public: // Attributes //////////////////////////////////////////////////////////////////////////// - wxPoint GetPosition(void) const; + wxPoint GetPosition() const; int GetPosition(unsigned axis) const; bool GetButtonState(unsigned button) const; - int GetZPosition(void) const; - int GetButtonState(void) const; - int GetPOVPosition(void) const; - int GetPOVCTSPosition(void) const; - int GetRudderPosition(void) const; - int GetUPosition(void) const; - int GetVPosition(void) const; - int GetMovementThreshold(void) const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; void SetMovementThreshold(int threshold) ; // Capabilities //////////////////////////////////////////////////////////////////////////// - static int GetNumberJoysticks(void); + static int GetNumberJoysticks(); - bool IsOk(void) const; // Checks that the joystick is functioning - int GetManufacturerId(void) const ; - int GetProductId(void) const ; - wxString GetProductName(void) const ; - int GetXMin(void) const; - int GetYMin(void) const; - int GetZMin(void) const; - int GetXMax(void) const; - int GetYMax(void) const; - int GetZMax(void) const; - int GetNumberButtons(void) const; - int GetNumberAxes(void) const; - int GetMaxButtons(void) const; - int GetMaxAxes(void) const; - int GetPollingMin(void) const; - int GetPollingMax(void) const; - int GetRudderMin(void) const; - int GetRudderMax(void) const; - int GetUMin(void) const; - int GetUMax(void) const; - int GetVMin(void) const; - int GetVMax(void) const; + bool IsOk() const; // Checks that the joystick is functioning + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; - bool HasRudder(void) const; - bool HasZ(void) const; - bool HasU(void) const; - bool HasV(void) const; - bool HasPOV(void) const; - bool HasPOV4Dir(void) const; - bool HasPOVCTS(void) const; + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() const; // Operations //////////////////////////////////////////////////////////////////////////// @@ -84,7 +84,7 @@ public: // pollingFreq = 0 means that movement events are sent when above the threshold. // If pollingFreq > 0, events are received every this many milliseconds. bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(void); + bool ReleaseCapture(); protected: int m_joystick; diff --git a/include/wx/msw/taskbar.h b/include/wx/msw/taskbar.h index e85302b49f..7859674cc6 100644 --- a/include/wx/msw/taskbar.h +++ b/include/wx/msw/taskbar.h @@ -29,7 +29,7 @@ public: // Operations bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString) wxOVERRIDE; - bool RemoveIcon(void) wxOVERRIDE; + bool RemoveIcon() wxOVERRIDE; bool PopupMenu(wxMenu *menu) wxOVERRIDE; // MSW-specific class methods diff --git a/include/wx/sckipc.h b/include/wx/sckipc.h index 7d1e2c32d0..4f050d0ce7 100644 --- a/include/wx/sckipc.h +++ b/include/wx/sckipc.h @@ -71,7 +71,7 @@ public: wxIPCFormat format = wxIPC_TEXT) wxOVERRIDE; virtual bool StartAdvise(const wxString& item) wxOVERRIDE; virtual bool StopAdvise(const wxString& item) wxOVERRIDE; - virtual bool Disconnect(void) wxOVERRIDE; + virtual bool Disconnect() wxOVERRIDE; // Will be used in the future to enable the compression but does nothing // for now. diff --git a/interface/wx/object.h b/interface/wx/object.h index e28facff9d..3497e94eb7 100644 --- a/interface/wx/object.h +++ b/interface/wx/object.h @@ -726,7 +726,7 @@ public: @code wxIMPLEMENT_ABSTRACT_CLASS(wxCommand, wxObject); - wxCommand::wxCommand(void) + wxCommand::wxCommand() { ... } @@ -754,7 +754,7 @@ public: @code wxIMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow); - wxFrame::wxFrame(void) + wxFrame::wxFrame() { ... } diff --git a/interface/wx/thread.h b/interface/wx/thread.h index 391b1e4ad7..13af77b285 100644 --- a/interface/wx/thread.h +++ b/interface/wx/thread.h @@ -1782,7 +1782,7 @@ bool wxIsMainThread(); Typically, these functions are used like this: @code - void MyThread::Foo(void) + void MyThread::Foo() { // before doing any GUI calls we must ensure that // this thread is the only one doing it! diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index e9baee8b7c..6473675e8b 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -1266,7 +1266,7 @@ bool wxGCDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& width return true; } -wxCoord wxGCDCImpl::GetCharWidth(void) const +wxCoord wxGCDCImpl::GetCharWidth() const { wxCoord width = 0; DoGetTextExtent( wxT("g") , &width , NULL , NULL , NULL , NULL ); @@ -1274,7 +1274,7 @@ wxCoord wxGCDCImpl::GetCharWidth(void) const return width; } -wxCoord wxGCDCImpl::GetCharHeight(void) const +wxCoord wxGCDCImpl::GetCharHeight() const { wxCoord height = 0; DoGetTextExtent( wxT("g") , NULL , &height , NULL , NULL , NULL ); @@ -1282,7 +1282,7 @@ wxCoord wxGCDCImpl::GetCharHeight(void) const return height; } -void wxGCDCImpl::Clear(void) +void wxGCDCImpl::Clear() { wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") ); diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index d1cd21b60b..640000169e 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -732,7 +732,7 @@ public: { } - virtual ~wxOutputFTPStream(void) + virtual ~wxOutputFTPStream() { if ( IsOk() ) { diff --git a/src/common/http.cpp b/src/common/http.cpp index a4621c0731..3ac60371f1 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -430,7 +430,7 @@ bool wxHTTP::BuildRequest(const wxString& path, const wxString& method) return ret_value; } -bool wxHTTP::Abort(void) +bool wxHTTP::Abort() { return wxSocketClient::Close(); } @@ -454,7 +454,7 @@ public: } size_t GetSize() const wxOVERRIDE { return m_httpsize; } - virtual ~wxHTTPStream(void) { m_http->Abort(); } + virtual ~wxHTTPStream() { m_http->Abort(); } protected: size_t OnSysRead(void *buffer, size_t bufsize) wxOVERRIDE; diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index ac6d23e229..7b936a0600 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -1123,7 +1123,7 @@ wxULongLongWx wxULongLongWx::operator%(const wxULongLongWx& ll) const // ---------------------------------------------------------------------------- // temporary - just for testing -void *wxLongLongWx::asArray(void) const +void *wxLongLongWx::asArray() const { static unsigned char temp[8]; @@ -1139,7 +1139,7 @@ void *wxLongLongWx::asArray(void) const return temp; } -void *wxULongLongWx::asArray(void) const +void *wxULongLongWx::asArray() const { static unsigned char temp[8]; diff --git a/src/common/matrix.cpp b/src/common/matrix.cpp index 1175af8342..69ef92cc2d 100644 --- a/src/common/matrix.cpp +++ b/src/common/matrix.cpp @@ -26,7 +26,7 @@ static const double pi = M_PI; -wxTransformMatrix::wxTransformMatrix(void) +wxTransformMatrix::wxTransformMatrix() { m_isIdentity = false; @@ -108,7 +108,7 @@ double wxTransformMatrix::operator()(int col, int row) const } // Invert matrix -bool wxTransformMatrix::Invert(void) +bool wxTransformMatrix::Invert() { double inverseMatrix[3][3]; @@ -146,7 +146,7 @@ bool wxTransformMatrix::Invert(void) } // Make into identity matrix -bool wxTransformMatrix::Identity(void) +bool wxTransformMatrix::Identity() { m_matrix[0][0] = m_matrix[1][1] = m_matrix[2][2] = 1.0; m_matrix[1][0] = m_matrix[2][0] = m_matrix[0][1] = m_matrix[2][1] = m_matrix[0][2] = m_matrix[1][2] = 0.0; diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 2795070054..ec4f6e64a4 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -455,11 +455,11 @@ int wxDebugContext::m_balignmask = (int)((char *)&markerCalc[1] - (char*)&marker // Pointer to global function to call at shutdown wxShutdownNotifyFunction wxDebugContext::sm_shutdownFn; -wxDebugContext::wxDebugContext(void) +wxDebugContext::wxDebugContext() { } -wxDebugContext::~wxDebugContext(void) +wxDebugContext::~wxDebugContext() { } @@ -573,14 +573,14 @@ void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from) /* Print out the list. */ -bool wxDebugContext::PrintList (void) +bool wxDebugContext::PrintList() { TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL)); return true; } -bool wxDebugContext::Dump(void) +bool wxDebugContext::Dump() { { const wxChar* appName = wxT("application"); @@ -720,7 +720,7 @@ bool wxDebugContext::PrintStatistics(bool detailed) return true; } -bool wxDebugContext::PrintClasses(void) +bool wxDebugContext::PrintClasses() { { const wxChar* appName = wxT("application"); diff --git a/src/common/time.cpp b/src/common/time.cpp index 7dfe4ac080..1d3836c7a5 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -328,7 +328,7 @@ wxLongLong wxGetLocalTimeMillis() #else // !wxUSE_LONGLONG -double wxGetLocalTimeMillis(void) +double wxGetLocalTimeMillis() { return (double(clock()) / double(CLOCKS_PER_SEC)) * 1000.0; } diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index 3f09530cd8..9dabec178d 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -128,7 +128,7 @@ bool wxGenericValidator::Copy(const wxGenericValidator& val) } // Called to transfer data to the window -bool wxGenericValidator::TransferToWindow(void) +bool wxGenericValidator::TransferToWindow() { if ( !m_validatorWindow ) return false; @@ -414,7 +414,7 @@ bool wxGenericValidator::TransferToWindow(void) } // Called to transfer data from the window -bool wxGenericValidator::TransferFromWindow(void) +bool wxGenericValidator::TransferFromWindow() { if ( !m_validatorWindow ) return false; diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 503fba2d44..77b50fbf99 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1643,7 +1643,7 @@ void wxPostScriptDCImpl::DoGetSizeMM(int *width, int *height) const } // Resolution in pixels per logical inch -wxSize wxPostScriptDCImpl::GetPPI(void) const +wxSize wxPostScriptDCImpl::GetPPI() const { return wxSize( DPI, DPI ); } diff --git a/src/msw/gdiobj.cpp b/src/msw/gdiobj.cpp index cc4db3fa3c..61257f2c83 100644 --- a/src/msw/gdiobj.cpp +++ b/src/msw/gdiobj.cpp @@ -29,7 +29,7 @@ #define M_GDIDATA static_cast(m_refData) /* -void wxGDIObject::IncrementResourceUsage(void) +void wxGDIObject::IncrementResourceUsage() { if ( !M_GDIDATA ) return; @@ -38,7 +38,7 @@ void wxGDIObject::IncrementResourceUsage(void) M_GDIDATA->m_usageCount ++; }; -void wxGDIObject::DecrementResourceUsage(void) +void wxGDIObject::DecrementResourceUsage() { if ( !M_GDIDATA ) return; diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index 9b177bbff3..821c038df0 100644 --- a/src/msw/helpwin.cpp +++ b/src/msw/helpwin.cpp @@ -56,7 +56,7 @@ bool wxWinHelpController::LoadFile(const wxString& file) return true; } -bool wxWinHelpController::DisplayContents(void) +bool wxWinHelpController::DisplayContents() { if (m_helpFile.empty()) return false; @@ -102,7 +102,7 @@ bool wxWinHelpController::KeywordSearch(const wxString& k, } // Can't close the help window explicitly in WinHelp -bool wxWinHelpController::Quit(void) +bool wxWinHelpController::Quit() { return WinHelp(GetSuitableHWND(this), 0, HELP_QUIT, 0) != 0; } diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index b8ee99c9b4..3d33a5757d 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -44,7 +44,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, return true; } -wxScrollBar::~wxScrollBar(void) +wxScrollBar::~wxScrollBar() { } @@ -153,7 +153,7 @@ void wxScrollBar::SetThumbPosition(int viewStart) ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE); } -int wxScrollBar::GetThumbPosition(void) const +int wxScrollBar::GetThumbPosition() const { WinStruct scrollInfo; scrollInfo.fMask = SIF_POS;