mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Use a const str& reference
This commit is contained in:
parent
eb7d01b3e7
commit
43218f1685
6 changed files with 16 additions and 16 deletions
|
@ -203,7 +203,7 @@ void FilePickerClass::SetupFiles(void)
|
|||
window->setTitle(currentDirectory);
|
||||
}
|
||||
|
||||
void FilePickerClass::FileSelected(str& currentDirectory, str& partialName, str& fullname) {}
|
||||
void FilePickerClass::FileSelected(const str& currentDirectory, const str& partialName, const str& fullname) {}
|
||||
|
||||
void FilePickerClass::FileSelected(Event *ev)
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ void FilePickerClass::FileSelected(Event *ev)
|
|||
uii.Snd_PlaySound("sound/menu/scroll.wav");
|
||||
}
|
||||
|
||||
void FilePickerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname) {}
|
||||
void FilePickerClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) {}
|
||||
|
||||
void FilePickerClass::FileChosen(Event *ev)
|
||||
{
|
||||
|
|
|
@ -47,9 +47,9 @@ private:
|
|||
protected:
|
||||
void CloseWindow(void);
|
||||
void FileSelected(Event *ev);
|
||||
virtual void FileSelected(str& currentDirectory, str& partialName, str& fullname);
|
||||
virtual void FileSelected(const str& currentDirectory, const str& partialName, const str& fullname);
|
||||
void FileChosen(Event *ev);
|
||||
virtual void FileChosen(str& currentDirectory, str& partialName, str& fullname);
|
||||
virtual void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname);
|
||||
void OnDeactivated(Event *ev);
|
||||
|
||||
public:
|
||||
|
|
|
@ -26,7 +26,7 @@ CLASS_DECLARATION(FilePickerClass, MapRunnerClass, NULL) {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
void MapRunnerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
||||
void MapRunnerClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
str newName;
|
||||
|
||||
|
@ -54,7 +54,7 @@ UIPickFileClass::~UIPickFileClass()
|
|||
}
|
||||
}
|
||||
|
||||
void UIPickFileClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
||||
void UIPickFileClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
if (!retobj || !retevent) {
|
||||
CloseWindow();
|
||||
|
@ -101,7 +101,7 @@ CLASS_DECLARATION(FilePickerClass, ViewSpawnerClass, NULL) {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
void ViewSpawnerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
||||
void ViewSpawnerClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
str newName;
|
||||
|
||||
|
@ -116,7 +116,7 @@ CLASS_DECLARATION(FilePickerClass, LODSpawnerClass, NULL) {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
void LODSpawnerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
||||
void LODSpawnerClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
str newName;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class MapRunnerClass : public FilePickerClass
|
|||
public:
|
||||
CLASS_PROTOTYPE(MapRunnerClass);
|
||||
|
||||
void FileChosen(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
};
|
||||
|
||||
class ViewSpawnerClass : public FilePickerClass
|
||||
|
@ -35,7 +35,7 @@ class ViewSpawnerClass : public FilePickerClass
|
|||
public:
|
||||
CLASS_PROTOTYPE(ViewSpawnerClass);
|
||||
|
||||
void FileChosen(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
};
|
||||
|
||||
class LODSpawnerClass : public FilePickerClass
|
||||
|
@ -43,7 +43,7 @@ class LODSpawnerClass : public FilePickerClass
|
|||
public:
|
||||
CLASS_PROTOTYPE(LODSpawnerClass);
|
||||
|
||||
void FileChosen(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
};
|
||||
|
||||
class UIPickFileClass : public FilePickerClass
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
UIPickFileClass();
|
||||
~UIPickFileClass();
|
||||
|
||||
void FileChosen(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
};
|
||||
|
||||
void PickFile(const char *name, Listener *obj, Event& event);
|
||||
|
|
|
@ -31,12 +31,12 @@ SoundPickerClass::SoundPickerClass()
|
|||
// FIXME: stub
|
||||
}
|
||||
|
||||
void SoundPickerClass::FileSelected(str& currentDirectory, str& partialName, str& fullname)
|
||||
void SoundPickerClass::FileSelected(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
// FIXME: stub
|
||||
}
|
||||
|
||||
void SoundPickerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
||||
void SoundPickerClass::FileChosen(const str& currentDirectory, const str& partialName, const str& fullname)
|
||||
{
|
||||
// FIXME: stub
|
||||
}
|
||||
|
|
|
@ -29,6 +29,6 @@ public:
|
|||
|
||||
SoundPickerClass();
|
||||
|
||||
void FileSelected(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileChosen(str& currentDirectory, str& partialName, str& fullname) override;
|
||||
void FileSelected(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
void FileChosen(const str& currentDirectory, const str& partialName, const str& fullname) override;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue