polserver/pol-core/bscript/StoredToken.cpp
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00

22 lines
609 B
C++

#include "bscript/StoredToken.h"
#include "clib/logfacility.h"
namespace Pol::Bscript
{
StoredToken::StoredToken( unsigned char aModule, int aID, BTokenType aType, unsigned aOffset )
: type( static_cast<unsigned char>( aType ) ),
id( static_cast<unsigned char>( aID ) ),
offset( static_cast<unsigned short>( aOffset ) ),
module( aModule )
{
if ( offset != aOffset )
{
ERROR_PRINTLN(
"Data segment overflowed.\nFlog the programmer for using 2-byte offsets in datafiles." );
throw std::runtime_error( "Data segment overflowed" );
}
}
} // namespace Pol::Bscript