|
From: <pst...@us...> - 2008-04-03 04:42:42
|
Revision: 390
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=390&view=rev
Author: pstieber
Date: 2008-04-02 21:42:40 -0700 (Wed, 02 Apr 2008)
Log Message:
-----------
Changed char* to const char* in many places.
Modified Paths:
--------------
trunk/jazz/src/ClockDialog.cpp
trunk/jazz/src/ClockDialog.h
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Filter.h
trunk/jazz/src/KeyDialog.cpp
trunk/jazz/src/KeyDialog.h
trunk/jazz/src/KeyStringConverters.cpp
trunk/jazz/src/NamedChoice.cpp
trunk/jazz/src/NamedChoice.h
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
Modified: trunk/jazz/src/ClockDialog.cpp
===================================================================
--- trunk/jazz/src/ClockDialog.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/ClockDialog.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -34,7 +34,7 @@
//*****************************************************************************
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-JZClockDialog::JZClockDialog(JZSong* pSong, char* pTitle, int Clock)
+JZClockDialog::JZClockDialog(JZSong* pSong, const char* pTitle, int Clock)
{
char Buffer[500];
pSong->Clock2String(Clock, Buffer);
Modified: trunk/jazz/src/ClockDialog.h
===================================================================
--- trunk/jazz/src/ClockDialog.h 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/ClockDialog.h 2008-04-03 04:42:40 UTC (rev 390)
@@ -32,7 +32,7 @@
{
public:
- JZClockDialog(JZSong* pSong, char* pTitle, int Clock);
+ JZClockDialog(JZSong* pSong, const char* pTitle, int Clock);
~JZClockDialog();
@@ -46,7 +46,7 @@
char* mpString;
- char* mpTitle;
+ const char* mpTitle;
JZSong* mpSong;
};
Modified: trunk/jazz/src/Dialogs.cpp
===================================================================
--- trunk/jazz/src/Dialogs.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/Dialogs.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -1473,7 +1473,7 @@
return;
tEventDlg *dlg = 0;
- char *str = 0;
+ const char* str = 0;
switch (e->Stat)
{
case StatKeyOn:
Modified: trunk/jazz/src/Filter.h
===================================================================
--- trunk/jazz/src/Filter.h 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/Filter.h 2008-04-03 04:42:40 UTC (rev 390)
@@ -45,7 +45,7 @@
{
public:
int Stat;
- char *Name;
+ const char* Name;
bool Selected;
int MinValue, MaxValue;
int FromValue, ToValue;
Modified: trunk/jazz/src/KeyDialog.cpp
===================================================================
--- trunk/jazz/src/KeyDialog.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/KeyDialog.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -27,33 +27,34 @@
#include "DeprecatedStringUtils.h"
#include "DeprecatedWx/proplist.h"
-tKeyDlg::tKeyDlg(char *t, int Key)
+tKeyDlg::tKeyDlg(const char* pTitle, int Key)
{
char buf[50];
Key2Str(Key, buf);
- String = copystring(buf);
- Title = t;
+ mpString = copystring(buf);
+ mpTitle = pTitle;
}
tKeyDlg::~tKeyDlg()
{
- delete String;
+ delete mpString;
}
#ifdef OBSOLETE
wxFormItem *tKeyDlg::mkFormItem(int w)
{
- return wxMakeFormString(Title, &String, wxFORM_DEFAULT,0,0,0,w);
+ return wxMakeFormString(mpTitle, &mpString, wxFORM_DEFAULT, 0, 0, 0, w);
}
#endif
-wxProperty* tKeyDlg::mkProperty(){
- return new wxProperty(Title, wxPropertyValue((char**)&String), "string");
+wxProperty* tKeyDlg::mkProperty()
+{
+ return new wxProperty(mpTitle, wxPropertyValue((char**)&mpString), "string");
}
int tKeyDlg::GetKey()
{
- return Str2Key(String);
+ return Str2Key(mpString);
}
Modified: trunk/jazz/src/KeyDialog.h
===================================================================
--- trunk/jazz/src/KeyDialog.h 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/KeyDialog.h 2008-04-03 04:42:40 UTC (rev 390)
@@ -27,12 +27,9 @@
class tKeyDlg
{
- char *String;
- char *Title;
-
public:
- tKeyDlg(char *title, int Key);
+ tKeyDlg(const char* pTitle, int Key);
~tKeyDlg();
@@ -41,6 +38,12 @@
wxProperty* mkProperty();
int GetKey();
+
+ private:
+
+ char* mpString;
+
+ const char* mpTitle;
};
#endif // !defined(JZ_KEYDIALOG_H)
Modified: trunk/jazz/src/KeyStringConverters.cpp
===================================================================
--- trunk/jazz/src/KeyStringConverters.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/KeyStringConverters.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -26,7 +26,7 @@
void Key2Str(int Key, char* pString)
{
- static char* pNames[] =
+ static const char* pNames[] =
{
"C",
"C#",
@@ -48,8 +48,8 @@
int Str2Key(const char *pString)
{
- static char sKey[] = "cCdDeEfFgGaAbB";
- static int nKey[] =
+ static const char sKey[] = "cCdDeEfFgGaAbB";
+ static int nKey[] =
{
0,
0,
Modified: trunk/jazz/src/NamedChoice.cpp
===================================================================
--- trunk/jazz/src/NamedChoice.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/NamedChoice.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -30,7 +30,7 @@
using namespace std;
tNamedChoice::tNamedChoice(
- char* pTitle,
+ const char* pTitle,
const std::vector<std::pair<std::string, int> >& Pairs,
int* pResult)
: //mpTitle(pTitle),
@@ -56,8 +56,15 @@
list->Append((wxObject *)copystring(mpValues[i].Name));
wxFormItemConstraint *constraint = wxMakeConstraintStrings(list);
- return wxMakeFormString(mpTitle, &mpSelection, wxFORM_SINGLE_LIST, new wxList(constraint, 0),
- 0, 0, w, h);
+ return wxMakeFormString(
+ mpTitle,
+ &mpSelection,
+ wxFORM_SINGLE_LIST,
+ new wxList(constraint, 0),
+ 0,
+ 0,
+ w,
+ h);
}
#endif
Modified: trunk/jazz/src/NamedChoice.h
===================================================================
--- trunk/jazz/src/NamedChoice.h 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/NamedChoice.h 2008-04-03 04:42:40 UTC (rev 390)
@@ -37,7 +37,7 @@
public:
tNamedChoice(
- char* pTitle,
+ const char* pTitle,
const std::vector<std::pair<std::string, int> >& Pairs,
int* pResult);
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/Track.cpp 2008-04-03 04:42:40 UTC (rev 390)
@@ -2089,11 +2089,11 @@
// ----------------------- Copyright ------------------------------------
-char* JZTrack::GetCopyright()
+const char* JZTrack::GetCopyright()
{
if (Copyright)
{
- return (char *)Copyright->Data;
+ return (const char *)Copyright->Data;
}
return "";
}
@@ -2120,11 +2120,11 @@
// ----------------------- Name ------------------------------------
-char* JZTrack::GetName()
+const char* JZTrack::GetName()
{
if (mName)
{
- return (char *)mName->Data;
+ return (const char*)mName->Data;
}
return "";
}
@@ -3335,7 +3335,7 @@
// ------------------------- State ----------------------------------
-char *JZTrack::GetStateChar()
+const char* JZTrack::GetStateChar()
{
switch (State)
{
Modified: trunk/jazz/src/Track.h
===================================================================
--- trunk/jazz/src/Track.h 2008-04-03 03:45:45 UTC (rev 389)
+++ trunk/jazz/src/Track.h 2008-04-03 04:42:40 UTC (rev 390)
@@ -440,20 +440,24 @@
}
void Merge(tEventArray *other);
- void MergeRange(tEventArray *other, int FromClock, int ToClock, int Replace = 0);
+ void MergeRange(
+ tEventArray *other,
+ int FromClock,
+ int ToClock,
+ int Replace = 0);
void Undo();
void Redo();
void NewUndoBuffer();
void Clear();
void Cleanup();
- char *GetName();
+ const char* GetName();
void SetName(char *Name);
- char *GetCopyright();
+ const char* GetCopyright();
void SetCopyright(char *Copyright);
- char *GetStateChar();
+ const char* GetStateChar();
void SetState(int NewState);
void ToggleState(int Direction); // +1 = next, -1 = prev
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|