99#include " win32-dirent.h"
1010#endif
1111
12- #ifdef __linux__
12+ #ifdef __unix__
1313#include < dirent.h>
1414#endif
1515
@@ -31,15 +31,15 @@ class PresetFactory;
3131
3232class PresetLoader {
3333 public:
34-
35-
36- // / Initializes the preset loader with the target directory specified
34+
35+
36+ // / Initializes the preset loader with the target directory specified
3737 PresetLoader (int gx, int gy, std::string dirname);
38-
38+
3939 ~PresetLoader ();
40-
40+
4141 // / Load a preset by specifying its unique identifier given when the preset url
42- // / was added to this loader
42+ // / was added to this loader
4343 std::auto_ptr<Preset> loadPreset (unsigned int index) const ;
4444 std::auto_ptr<Preset> loadPreset ( const std::string & url ) const ;
4545 // / Add a preset to the loader's collection.
@@ -48,26 +48,26 @@ class PresetLoader {
4848 // / \param rating an integer representing the goodness of the preset
4949 // / \returns The unique index assigned to the preset in the collection. Used with loadPreset
5050 unsigned int addPresetURL ( const std::string & url, const std::string & presetName, const RatingList & ratings);
51-
51+
5252 // / Add a preset to the loader's collection.
5353 // / \param index insertion index
5454 // / \param url an url referencing the preset
5555 // / \param presetName a name for the preset
5656 // / \param rating an integer representing the goodness of the preset
5757 void insertPresetURL (unsigned int index, const std::string & url, const std::string & presetName, const RatingList & ratings);
58-
58+
5959 // / Clears all presets from the collection
60- inline void clear () {
61- _entries.clear (); _presetNames.clear ();
60+ inline void clear () {
61+ _entries.clear (); _presetNames.clear ();
6262 _ratings = std::vector<RatingList>(TOTAL_RATING_TYPES, RatingList ());
6363 clearRatingsSum ();
6464 }
6565
6666 inline void clearRatingsSum () {
6767 _ratingsSums = std::vector<int >(TOTAL_RATING_TYPES, 0 );
6868 }
69-
70- const std::vector<RatingList> & getPresetRatings () const ;
69+
70+ const std::vector<RatingList> & getPresetRatings () const ;
7171 const std::vector<int > & getPresetRatingsSums () const ;
7272
7373 // / Removes a preset from the loader
@@ -76,29 +76,29 @@ class PresetLoader {
7676
7777 // / Sets the rating of a preset to a new value
7878 void setRating (unsigned int index, int rating, const PresetRatingType ratingType);
79-
79+
8080 // / Get a preset rating given an index
8181 int getPresetRating ( unsigned int index, const PresetRatingType ratingType) const ;
82-
82+
8383 // / Get a preset url given an index
8484 const std::string & getPresetURL ( unsigned int index) const ;
85-
85+
8686 // / Get a preset name given an index
8787 const std::string & getPresetName ( unsigned int index) const ;
88-
89- // / Returns the number of presets in the active directory
88+
89+ // / Returns the number of presets in the active directory
9090 inline std::size_t size () const {
9191 return _entries.size ();
9292 }
93-
94- // / Sets the directory where the loader will search for files
93+
94+ // / Sets the directory where the loader will search for files
9595 void setScanDirectory (std::string pathname);
9696
9797 // / Returns the directory path associated with this preset chooser
9898 inline const std::string & directoryName () const {
9999 return _dirname;
100100 }
101-
101+
102102 // / Rescans the active preset directory
103103 void rescan ();
104104 void setPresetName (unsigned int index, std::string name);
@@ -115,7 +115,7 @@ class PresetLoader {
115115
116116 // Indexed by ratingType, preset position.
117117 std::vector<RatingList> _ratings;
118-
118+
119119
120120};
121121
0 commit comments