forked from 0ad/0ad
janwas
5bf9bca9ef
there are too many W4 and "potentially uninitialized", so those are disabled by 0ad_warning_disable.h. the silly "int x = strlen" and very dangerous "int x = (void*)p" (and vice versa) problems are fixed. This was SVN commit r5526.
39 lines
756 B
C++
39 lines
756 B
C++
#include "precompiled.h"
|
|
#include "0ad_warning_disable.h"
|
|
# include "sr_sn.h"
|
|
|
|
//# define SR_USE_TRACE1 // SrSn Const/Dest
|
|
# include "sr_trace.h"
|
|
|
|
//======================================= SrSn ====================================
|
|
|
|
SrSn::SrSn ( SrSn::Type t, const char* class_name )
|
|
{
|
|
SR_TRACE1 ( "Constructor" );
|
|
_ref = 0;
|
|
_visible = 1;
|
|
_type = t;
|
|
_label = 0;
|
|
_inst_class_name = class_name;
|
|
}
|
|
|
|
SrSn::~SrSn ()
|
|
{
|
|
SR_TRACE1 ( "Destructor" );
|
|
delete _label;
|
|
}
|
|
|
|
void SrSn::label ( const char* s )
|
|
{
|
|
sr_string_set ( _label, s );
|
|
}
|
|
|
|
const char* SrSn::label () const
|
|
{
|
|
return _label? _label:"";
|
|
}
|
|
|
|
|
|
//======================================= EOF ====================================
|
|
|