From 07a9789ec58b09010d51e9aa81f84b6d8984983b Mon Sep 17 00:00:00 2001 From: "RichardAsh1981@gmail.com" Date: Sat, 21 Sep 2013 19:34:12 +0000 Subject: [PATCH] make functions which do not require access to class member variables static so they can be called without an object to do so with. Based on part of a patch by Campbell Barton --- src/Project.cpp | 2 +- src/TrackPanel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index 562c7ee6a..9428ef16f 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -677,7 +677,7 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized) } } -wxString CreateUniqueName() +static wxString CreateUniqueName() { static int count = 0; return wxDateTime::Now().Format(wxT("%Y-%m-%d %H-%M-%S")) + diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index b8c519a8d..d80d468bb 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -362,7 +362,7 @@ BEGIN_EVENT_TABLE(TrackPanel, wxWindow) END_EVENT_TABLE() /// Makes a cursor from an XPM, uses CursorId as a fallback. -wxCursor * MakeCursor( int CursorId, const char * pXpm[36], int HotX, int HotY ) +static wxCursor * MakeCursor( int CursorId, const char * pXpm[36], int HotX, int HotY ) { wxCursor * pCursor; @@ -8748,7 +8748,7 @@ LWSlider * TrackInfo::PanSlider(int trackIndex) return mPans[trackIndex - mSliderOffset]; } -TrackPanel * TrackPanelFactory(wxWindow * parent, +static TrackPanel * TrackPanelFactory(wxWindow * parent, wxWindowID id, const wxPoint & pos, const wxSize & size,