polserver/pol-core/bscript/StoredToken.cpp
turleypol 21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00

22 lines
604 B
C++

#include "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