mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* 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
22 lines
609 B
C++
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
|