Guest User

xbmc freebsd

a guest
Jul 4th, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.84 KB | None | 0 0
  1. // PresetLoader.hpp
  2. class PresetLoader {
  3.     public:
  4.         static const std::string PROJECTM_FILE_EXTENSION;
  5.         static const std::string MILKDROP_FILE_EXTENSION;
  6.  
  7.         /** Initializes the preset loader with the target directory specified */
  8.         PresetLoader(std::string dirname);
  9.  
  10.         /** Destructor will remove all alllocated presets */
  11.         ~PresetLoader();
  12.  
  13.     private:
  14.         std::string m_dirname;
  15.         DIR * m_dir;
  16.         int m_ratingsSum;
  17. }
  18.  
  19. // PresetLoader.cpp
  20. PresetLoader::PresetLoader(std::string dirname = std::string()) :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
  21. {
  22.   // Do one scan
  23.     if (m_dirname != std::string())
  24.         rescan();
  25. }
  26.  
  27. /* compile error on FreeBSD 10:
  28. /home/uqs/ports/xbmc/work/xbmc-12.2/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.cpp:38:40:
  29. error: addition of default argument on redeclaration makes
  30.       this constructor a default constructor
  31. PresetLoader::PresetLoader(std::string dirname = std::string())
  32. :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
  33.                                        ^       ~~~~~~~~~~~~~~~
  34. /home/uqs/ports/xbmc/work/xbmc-12.2/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.hpp:32:3:
  35. note: previous declaration is here
  36.                 PresetLoader(std::string dirname);
  37.                 ^
  38. 1 error generated.
  39.  */
  40.  
  41. /* warning on FreeBSD 9.1
  42. warning: addition of default argument on redeclaration makes this constructor a default constructor [-Wdefault-arg-special-member]
  43. PresetLoader::PresetLoader(std::string dirname = std::string()) :m_dirname(dirname), m_dir(0), m_ratingsSum(0)
  44.                                        ^       ~~~~~~~~~~~~~~~
  45. /home/fneufneu/xbmc/xbmc/visualizations/XBMCProjectM/libprojectM/PresetLoader.hpp:32:3: note: previous declaration was not a special member function
  46.                 PresetLoader(std::string dirname);
  47.                 ^
  48. 1 warning generated.
  49.  */
Add Comment
Please, Sign In to add comment