Changeset - r26812:faf937228527
[Not reviewed]
master
0 9 0
Rubidium - 21 months ago 2023-01-26 21:50:43
rubidium@openttd.org
Cleanup: remove commented out code
9 files changed with 2 insertions and 26 deletions:
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/squirrel/sqcompiler.cpp
Show inline comments
 
@@ -607,7 +607,6 @@ public:
 
		switch(_token)
 
		{
 
		case TK_STRING_LITERAL: {
 
				//SQObjectPtr id(SQString::Create(_ss(_vm), _lex._svalue,_lex._longstr.size()-1));
 
				_fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(_fs->CreateString(_lex._svalue,_lex._longstr.size()-1)));
 
				Lex();
 
			}
 
@@ -840,7 +839,6 @@ public:
 
			unsigned char flags = (hasattrs?NEW_SLOT_ATTRIBUTES_FLAG:0)|(isstatic?NEW_SLOT_STATIC_FLAG:0);
 
			SQInteger table = _fs->TopTarget(); //<<BECAUSE OF THIS NO COMMON EMIT FUNC IS POSSIBLE
 
			_fs->AddInstruction(_OP_NEWSLOTA, flags, table, key, val);
 
			//_fs->PopTarget();
 
		}
 
		if(separator == ',') //hack recognizes a table from the separator
 
			_fs->SetIntructionParam(tpos, 1, nkeys);
 
@@ -1053,7 +1051,6 @@ public:
 
		if(tonextcondjmp != -1)
 
			_fs->SetIntructionParam(tonextcondjmp, 1, _fs->GetCurrentPos() - tonextcondjmp);
 
		if(_token == TK_DEFAULT) {
 
		//	_fs->AddLineInfos(_lex._currentline, _lineinfo);
 
			Lex(); Expect(':');
 
			SQInteger stacksize = _fs->GetStackSize();
 
			_last_stacksize = _fs->GetStackSize();
 
@@ -1167,11 +1164,6 @@ public:
 
		}
 
		SQTable *enums = _table(_ss(_vm)->_consts);
 
		SQObjectPtr strongid = id;
 
		/*SQObjectPtr dummy;
 
		if(enums->Get(strongid,dummy)) {
 
			dummy.Null(); strongid.Null();
 
			Error("enumeration already exists");
 
		}*/
 
		enums->NewSlot(SQObjectPtr(strongid),SQObjectPtr(table));
 
		strongid.Null();
 
		Lex();
 
@@ -1318,7 +1310,6 @@ public:
 
		funcstate->AddLineInfos(_lex._prevtoken == '\n'?_lex._lasttokenline:_lex._currentline, _lineinfo, true);
 
        funcstate->AddInstruction(_OP_RETURN, -1);
 
		funcstate->SetStackSize(0);
 
		//_fs->->_stacksize = _fs->_stacksize;
 
		SQFunctionProto *func = funcstate->BuildProto();
 
#ifdef _DEBUG_DUMP
 
		funcstate->Dump(func);
src/3rdparty/squirrel/squirrel/sqlexer.cpp
Show inline comments
 
@@ -177,7 +177,6 @@ SQInteger SQLexer::Lex()
 
			else if ( CUR_CHAR == '-' ) { NEXT(); RETURN_TOKEN(TK_NEWSLOT); }
 
			else if ( CUR_CHAR == '<' ) { NEXT(); RETURN_TOKEN(TK_SHIFTL); }
 
			else if ( CUR_CHAR == '/' ) { NEXT(); RETURN_TOKEN(TK_ATTR_OPEN); }
 
			//else if ( CUR_CHAR == '[' ) { NEXT(); ReadMultilineString(); RETURN_TOKEN(TK_STRING_LITERAL); }
 
			else { RETURN_TOKEN('<') }
 
		case '>':
 
			NEXT();
src/3rdparty/squirrel/squirrel/sqvm.h
Show inline comments
 
@@ -36,7 +36,6 @@ struct SQVM : public CHAINABLE_OBJ
 
	};
 

	
 
	struct CallInfo{
 
		//CallInfo() { _generator._type = OT_NULL;}
 
		SQInstruction *_ip;
 
		SQObjectPtr *_literals;
 
		SQObjectPtr _closure;
src/blitter/40bpp_anim.hpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
class Blitter_40bppAnim : public Blitter_32bppOptimized {
 
public:
 

	
 
	// void *MoveTo(void *video, int x, int y) override;
 
	void SetPixel(void *video, int x, int y, uint8 colour) override;
 
	void DrawRect(void *video, int width, int height, uint8 colour) override;
 
	void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override;
src/misc/countedptr.hpp
Show inline comments
 
@@ -125,12 +125,6 @@ public:
 
		return m_pT == nullptr;
 
	}
 

	
 
	/** another way how to test for nullptr value */
 
	//inline bool operator == (const CCountedPtr &sp) const {return m_pT == sp.m_pT;}
 

	
 
	/** yet another way how to test for nullptr value */
 
	//inline bool operator != (const CCountedPtr &sp) const {return m_pT != sp.m_pT;}
 

	
 
	/** assign pointer w/o incrementing ref count */
 
	inline void Attach(Tcls *pT)
 
	{
src/pathfinder/npf/aystar.h
Show inline comments
 
@@ -20,8 +20,6 @@
 
#include "../../tile_type.h"
 
#include "../../track_type.h"
 

	
 
//#define AYSTAR_DEBUG
 

	
 
/** Return status of #AyStar methods. */
 
enum AystarStatus {
 
	AYSTAR_FOUND_END_NODE, ///< An end node was found.
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -314,7 +314,6 @@ static Vehicle *CountShipProc(Vehicle *v
 

	
 
static int32 NPFWaterPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent)
 
{
 
	/* TileIndex tile = current->tile; */
 
	int32 cost = 0;
 
	Trackdir trackdir = current->direction;
 

	
 
@@ -1114,7 +1113,6 @@ void InitializeNPF()
 
	}
 
	_npf_aystar.loops_per_tick = 0;
 
	_npf_aystar.max_path_cost = 0;
 
	//_npf_aystar.max_search_nodes = 0;
 
	/* We will limit the number of nodes for now, until we have a better
 
	 * solution to really fix performance */
 
	_npf_aystar.max_search_nodes = _settings_game.pf.npf.npf_max_search_nodes;
src/string.cpp
Show inline comments
 
@@ -618,7 +618,6 @@ size_t Utf8Decode(WChar *c, const char *
 
		}
 
	}
 

	
 
	/* Debug(misc, 1, "[utf8] invalid UTF-8 sequence"); */
 
	*c = '?';
 
	return 1;
 
}
 
@@ -654,7 +653,6 @@ inline size_t Utf8Encode(T buf, WChar c)
 
		return 4;
 
	}
 

	
 
	/* Debug(misc, 1, "[utf8] can't UTF-8 encode value 0x{:X}", c); */
 
	*buf = '?';
 
	return 1;
 
}
src/viewport.cpp
Show inline comments
 
@@ -262,8 +262,8 @@ void InitializeWindowViewport(Window *w,
 
	vp->overlay = nullptr;
 

	
 
	w->viewport = vp;
 
	vp->virtual_left = 0; // pt.x;
 
	vp->virtual_top = 0;  // pt.y;
 
	vp->virtual_left = 0;
 
	vp->virtual_top = 0;
 
}
 

	
 
static Point _vp_move_offs;
0 comments (0 inline, 0 general)