Changeset - r27972:6274f9a95a32
[Not reviewed]
master
0 7 0
Peter Nelson - 14 months ago 2023-09-25 12:02:51
peter1138@openttd.org
Codechange: Add missing override specifiers to squirrel.
7 files changed with 22 insertions and 22 deletions:
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/squirrel/sqclass.h
Show inline comments
 
@@ -55,13 +55,13 @@ public:
 
	bool SetAttributes(const SQObjectPtr &key,const SQObjectPtr &val);
 
	bool GetAttributes(const SQObjectPtr &key,SQObjectPtr &outval);
 
	void Lock() { _locked = true; if(_base) _base->Lock(); }
 
	void Release() {
 
	void Release() override {
 
		if (_hook) { _hook(_typetag,0);}
 
		sq_delete(this, SQClass);
 
	}
 
	void Finalize();
 
	void Finalize() override;
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
#endif
 
	SQInteger Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval);
 
	SQInstance *CreateInstance();
src/3rdparty/squirrel/squirrel/sqclosure.h
Show inline comments
 
@@ -14,7 +14,7 @@ public:
 
		new (nc) SQClosure(ss,func);
 
		return nc;
 
	}
 
	void Release(){
 
	void Release() override {
 
		sq_delete(this,SQClosure);
 
	}
 
	SQClosure *Clone()
 
@@ -32,8 +32,8 @@ public:
 
	bool Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write);
 
	static bool Load(SQVM *v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &ret);
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void Finalize(){_outervalues.resize(0); }
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
	void Finalize() override {_outervalues.resize(0); }
 
#endif
 
	SQObjectPtr _env;
 
	SQObjectPtr _function;
 
@@ -60,14 +60,14 @@ public:
 
		_state=eDead;
 
		_stack.resize(0);
 
		_closure=_null_;}
 
	void Release(){
 
	void Release() override {
 
		sq_delete(this,SQGenerator);
 
	}
 
	bool Yield(SQVM *v);
 
	bool Resume(SQVM *v,SQInteger target);
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void Finalize(){_stack.resize(0);_closure=_null_;}
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
	void Finalize() override {_stack.resize(0);_closure=_null_;}
 
#endif
 
	SQObjectPtr _closure;
 
	SQObjectPtrVec _stack;
 
@@ -102,12 +102,12 @@ public:
 
	{
 
		REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this);
 
	}
 
	void Release(){
 
	void Release() override {
 
		sq_delete(this,SQNativeClosure);
 
	}
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void Finalize(){_outervalues.resize(0);}
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
	void Finalize() override {_outervalues.resize(0);}
 
#endif
 
	SQInteger _nparamscheck;
 
	SQIntVec _typecheck;
src/3rdparty/squirrel/squirrel/sqfuncproto.h
Show inline comments
 
@@ -103,7 +103,7 @@ public:
 
		new (f) SQFunctionProto(ninstructions, nliterals, nparameters, nfunctions, noutervalues, nlineinfos, nlocalvarinfos, ndefaultparams);
 
		return f;
 
	}
 
	void Release(){
 
	void Release() override {
 
		_DESTRUCT_VECTOR(SQObjectPtr,_nliterals,_literals);
 
		_DESTRUCT_VECTOR(SQObjectPtr,_nparameters,_parameters);
 
		_DESTRUCT_VECTOR(SQObjectPtr,_nfunctions,_functions);
src/3rdparty/squirrel/squirrel/sqobject.h
Show inline comments
 
@@ -84,7 +84,7 @@ private:
 

	
 
struct SQWeakRef : SQRefCounted
 
{
 
	void Release();
 
	void Release() override;
 
	SQObject _obj;
 
};
 

	
 
@@ -362,7 +362,7 @@ struct SQCollectable : public SQRefCount
 
	SQCollectable *_next;
 
	SQCollectable *_prev;
 
	SQSharedState *_sharedstate;
 
	virtual void Release()=0;
 
	void Release() override=0;
 
	virtual void EnqueueMarkObjectForChildren(class SQGCMarkerQueue &queue)=0;
 
	void UnMark();
 
	virtual void Finalize()=0;
src/3rdparty/squirrel/squirrel/sqstring.h
Show inline comments
 
@@ -19,7 +19,7 @@ public:
 
	static SQString *Create(SQSharedState *ss, const SQChar *, SQInteger len = -1 );
 
	static SQString *Create(SQSharedState *ss, const std::string &str) { return Create(ss, str.data(), str.size()); }
 
	SQInteger Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval);
 
	void Release();
 
	void Release() override;
 
	SQSharedState *_sharedstate;
 
	SQString *_next; //chain for the string table
 
	SQInteger _len;
src/3rdparty/squirrel/squirrel/squserdata.h
Show inline comments
 
@@ -18,10 +18,10 @@ struct SQUserData : SQDelegable
 
		return ud;
 
	}
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void Finalize(){SetDelegate(nullptr);}
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
	void Finalize() override {SetDelegate(nullptr);}
 
#endif
 
	void Release() {
 
	void Release() override {
 
		if (_hook) _hook(_val,_size);
 
		SQInteger tsize = _size - 1;
 
		this->~SQUserData();
src/3rdparty/squirrel/squirrel/sqvm.h
Show inline comments
 
@@ -112,16 +112,16 @@ public:
 
#endif
 

	
 
#ifndef NO_GARBAGE_COLLECTOR
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue);
 
	void EnqueueMarkObjectForChildren(SQGCMarkerQueue &queue) override;
 
#endif
 
	void Finalize();
 
	void Finalize() override;
 
	void GrowCallStack() {
 
		SQInteger newsize = _alloccallsstacksize*2;
 
		_callstackdata.resize(newsize);
 
		_callsstack = &_callstackdata[0];
 
		_alloccallsstacksize = newsize;
 
	}
 
	void Release(){ sq_delete(this,SQVM); } //does nothing
 
	void Release() override { sq_delete(this,SQVM); } //does nothing
 
////////////////////////////////////////////////////////////////////////////
 
	//stack functions for the api
 
	void Remove(SQInteger n);
0 comments (0 inline, 0 general)