File diff r25185:205b0c2c0e50 → r25186:b31f7cc3774b
src/3rdparty/squirrel/squirrel/sqarray.h
Show inline comments
 
@@ -14,15 +14,15 @@ public:
 
	static SQArray* Create(SQSharedState *ss,SQInteger nInitialSize){
 
		SQArray *newarray=(SQArray*)SQ_MALLOC(sizeof(SQArray));
 
		new (newarray) SQArray(ss,nInitialSize);
 
		return newarray;
 
	}
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
#endif
 
	void Finalize(){
 
	void Finalize() override {
 
		_values.resize(0);
 
	}
 
	bool Get(const SQInteger nidx,SQObjectPtr &val)
 
	{
 
		if(nidx>=0 && nidx<(SQInteger)_values.size()){
 
			SQObjectPtr &o = _values[nidx];
 
@@ -75,13 +75,17 @@ public:
 
		if(idx < 0 || idx >= (SQInteger)_values.size())
 
			return false;
 
		_values.remove(idx);
 
		ShrinkIfNeeded();
 
		return true;
 
	}
 
	void Release()
 
	void Release() override
 
	{
 
		sq_delete(this,SQArray);
 
		this->_sharedstate->DelayFinalFree(this);
 
	}
 
	void FinalFree() override
 
	{
 
		sq_delete(this, SQArray);
 
	}
 
	SQObjectPtrVec _values;
 
};
 
#endif //_SQARRAY_H_