Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PresetLoader.hpp
- class PresetLoader {
- public:
- static const std::string PROJECTM_FILE_EXTENSION;
- static const std::string MILKDROP_FILE_EXTENSION;
- /** Initializes the preset loader with the target directory specified */
- PresetLoader(std::string dirname);
- /** Destructor will remove all alllocated presets */
- ~PresetLoader();
- private:
- std::string m_dirname;
- DIR * m_dir;
- int m_ratingsSum;
- }
- // PresetLoader.cpp
- PresetLoader::PresetLoader(std::string dirname = std::string()) :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
- {
- // Do one scan
- if (m_dirname != std::string())
- rescan();
- }
- /* compile error on FreeBSD 10:
- /home/uqs/ports/xbmc/work/xbmc-12.2/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.cpp:38:40:
- error: addition of default argument on redeclaration makes
- this constructor a default constructor
- PresetLoader::PresetLoader(std::string dirname = std::string())
- :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
- ^ ~~~~~~~~~~~~~~~
- /home/uqs/ports/xbmc/work/xbmc-12.2/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.hpp:32:3:
- note: previous declaration is here
- PresetLoader(std::string dirname);
- ^
- 1 error generated.
- */
- /* warning on FreeBSD 9.1
- warning: addition of default argument on redeclaration makes this constructor a default constructor [-Wdefault-arg-special-member]
- PresetLoader::PresetLoader(std::string dirname = std::string()) :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
- ^ ~~~~~~~~~~~~~~~
- /home/fneufneu/xbmc/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.hpp:32:3: note: previous declaration was not a special member function
- PresetLoader(std::string dirname);
- ^
- 1 warning generated.
- */
Add Comment
Please, Sign In to add comment