Changeset - r20551:582529d7fba1
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-07-10 15:38:42
rubidium@openttd.org
(svn r25579) -Fix [FS#5642] (r25577): doxygen generation failed + typo fix
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_list.hpp
Show inline comments
 
@@ -24,29 +24,29 @@ class ScriptListSorter;
 
 * @api ai game
 
 */
 
class ScriptList : public ScriptObject {
 
public:
 
	/** Type of sorter */
 
	enum SorterType {
 
		SORT_BY_VALUE, ///< Sort the list based on the value of the item.
 
		SORT_BY_ITEM,  ///< Sort the list based on the item itself.
 
	};
 

	
 
	/** Sort ascending */
 
	static const bool SORT_ASCENDING = true;
 
	/** Sort descnding */
 
	/** Sort descending */
 
	static const bool SORT_DESCENDING = false;
 

	
 
private:
 
	ScriptListSorter *sorter;         ///< Sorting algorithm
 
	ScriptListSorter *sorter;     ///< Sorting algorithm
 
	SorterType sorter_type;       ///< Sorting type
 
	bool sort_ascending;          ///< Whether to sort ascending or descending
 
	bool initialized;             ///< Whether an iteration has been started
 
	int modifications;            ///< Number of modification that has been done. To prevent changing data while valuating.
 

	
 
public:
 
	typedef std::set<int32> ScriptItemList;                   ///< The list of items inside the bucket
 
	typedef std::map<int32, ScriptItemList> ScriptListBucket; ///< The bucket list per value
 
	typedef std::map<int32, int32> ScriptListMap;             ///< List per item
 

	
 
	ScriptListMap items;           ///< The items in the list
 
	ScriptListBucket buckets;      ///< The items in the list, sorted by value
 
@@ -54,25 +54,25 @@ public:
 
	ScriptList();
 
	~ScriptList();
 

	
 
#ifdef DOXYGEN_API
 
	/**
 
	 * Add a single item to the list.
 
	 * @param item the item to add. Should be unique, otherwise it is ignored.
 
	 * @param value the value to assign.
 
	 */
 
	void AddItem(int32 item, int32 value);
 
#else
 
	void AddItem(int32 item, int32 value = 0);
 
#endif
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Remove a single item from the list.
 
	 * @param item the item to remove. If not existing, it is ignored.
 
	 */
 
	void RemoveItem(int32 item);
 

	
 
	/**
 
	 * Clear the list, making Count() returning 0 and IsEmpty() returning true.
 
	 */
 
	void Clear();
 

	
0 comments (0 inline, 0 general)