[notesloader] Take advantage of const members.
This commit is contained in:
@@ -18,6 +18,10 @@ const float FAST_BPM_WARP = 9999999.f;
|
||||
/** @brief Reads a Song from an .SM file. */
|
||||
struct SMLoader
|
||||
{
|
||||
SMLoader() : fileExt(".sm") {}
|
||||
|
||||
SMLoader(RString ext) : fileExt(ext) {}
|
||||
|
||||
virtual ~SMLoader() {}
|
||||
|
||||
bool LoadFromDir( const RString &sPath, Song &out );
|
||||
@@ -143,6 +147,15 @@ protected:
|
||||
RString sRadarValues,
|
||||
RString sNoteData,
|
||||
Steps &out);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the file extension associated with this loader.
|
||||
* @return the file extension. */
|
||||
RString GetFileExtension() const { return fileExt; }
|
||||
|
||||
private:
|
||||
/** @brief The file extension in use. */
|
||||
const RString fileExt;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@ enum SMALoadingStates
|
||||
/** @brief Reads a Song from a .SMA file. */
|
||||
struct SMALoader : public SMLoader
|
||||
{
|
||||
SMALoader() : SMLoader(".sma") {}
|
||||
bool LoadFromDir( const RString &sPath, Song &out );
|
||||
|
||||
virtual bool LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache = false );
|
||||
|
||||
@@ -32,6 +32,8 @@ const float VERSION_SPLIT_TIMING = 0.7f;
|
||||
*/
|
||||
struct SSCLoader : public SMLoader
|
||||
{
|
||||
SSCLoader() : SMLoader(".ssc") {}
|
||||
|
||||
/**
|
||||
* @brief Attempt to load a song from a specified path.
|
||||
* @param sPath a const reference to the path on the hard drive to check.
|
||||
|
||||
Reference in New Issue
Block a user