1
0
forked from 0ad/0ad
0ad/source/dcdt/se/sr_sn.cpp
janwas 5bf9bca9ef fix/disable warnings.
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.
2007-12-23 12:18:57 +00:00

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 ====================================