Changeset - r23540:8ae17b2213ea
[Not reviewed]
master
0 2 0
Henry Wilson - 6 years ago 2019-03-13 20:55:31
m3henry@googlemail.com
Codechange: Use range-based for-loop in Auto[Free|Delete]SmallVector
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/core/smallvec_type.hpp
Show inline comments
 
@@ -91,8 +91,8 @@ public:
 
	 */
 
	inline void Clear()
 
	{
 
		for (uint i = 0; i < std::vector<T>::size(); i++) {
 
			free(std::vector<T>::operator[](i));
 
		for (T p : *this) {
 
			free(p);
 
		}
 

	
 
		std::vector<T>::clear();
 
@@ -121,8 +121,8 @@ public:
 
	 */
 
	inline void Clear()
 
	{
 
		for (uint i = 0; i < std::vector<T>::size(); i++) {
 
			delete std::vector<T>::operator[](i);
 
		for (T p : *this) {
 
			delete p;
 
		}
 

	
 
		std::vector<T>::clear();
src/script/squirrel_helper.hpp
Show inline comments
 
@@ -32,7 +32,7 @@ namespace SQConvert {
 
	struct SQAutoFreePointers : std::vector<void *> {
 
		~SQAutoFreePointers()
 
		{
 
			for (uint i = 0; i < std::vector<void *>::size(); i++) free(std::vector<void *>::operator[](i));
 
			for (void * p : *this) free(p);
 
		}
 
	};
 

	
0 comments (0 inline, 0 general)