use CopiedString.empty()
This commit is contained in:
parent
1f2e1616a8
commit
649fcd4067
|
|
@ -125,7 +125,7 @@ public:
|
||||||
void evaluate( StringBuffer& output ) const override {
|
void evaluate( StringBuffer& output ) const override {
|
||||||
StringBuffer buffer;
|
StringBuffer buffer;
|
||||||
m_test->evaluate( buffer );
|
m_test->evaluate( buffer );
|
||||||
if ( !string_empty( buffer.c_str() ) ) {
|
if ( !buffer.empty() ) {
|
||||||
m_result->evaluate( output );
|
m_result->evaluate( output );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ void environment_init( int argc, char* argv[] ){
|
||||||
{
|
{
|
||||||
char real[PATH_MAX];
|
char real[PATH_MAX];
|
||||||
app_filepath = getexename( real );
|
app_filepath = getexename( real );
|
||||||
ASSERT_MESSAGE( !string_empty( app_filepath.c_str() ), "failed to deduce app path" );
|
ASSERT_MESSAGE( !app_filepath.empty(), "failed to deduce app path" );
|
||||||
// NOTE: we build app path with a trailing '/'
|
// NOTE: we build app path with a trailing '/'
|
||||||
// it's a general convention in Radiant to have the slash at the end of directories
|
// it's a general convention in Radiant to have the slash at the end of directories
|
||||||
app_path = PathFilenameless( real );
|
app_path = PathFilenameless( real );
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,7 @@ struct ModelResource : public Resource
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool isModified() const {
|
bool isModified() const {
|
||||||
return ( ( !string_empty( m_path.c_str() ) // had or has an absolute path
|
return ( ( !m_path.empty() // had or has an absolute path
|
||||||
&& m_modified != modified() ) // AND disk timestamp changed
|
&& m_modified != modified() ) // AND disk timestamp changed
|
||||||
|| !path_equal( rootPath( m_originalName.c_str() ), m_path.c_str() ) ); // OR absolute vfs-root changed
|
|| !path_equal( rootPath( m_originalName.c_str() ), m_path.c_str() ) ); // OR absolute vfs-root changed
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ typedef std::pair<LoadImageCallback, CopiedString> TextureKey;
|
||||||
|
|
||||||
void qtexture_realise( qtexture_t& texture, const TextureKey& key ){
|
void qtexture_realise( qtexture_t& texture, const TextureKey& key ){
|
||||||
texture.texture_number = 0;
|
texture.texture_number = 0;
|
||||||
if ( !string_empty( key.second.c_str() ) ) {
|
if ( !key.second.empty() ) {
|
||||||
if( !key.first.m_skybox ){
|
if( !key.first.m_skybox ){
|
||||||
Image* image = key.first.loadImage( key.second.c_str() );
|
Image* image = key.first.loadImage( key.second.c_str() );
|
||||||
if ( image != 0 ) {
|
if ( image != 0 ) {
|
||||||
|
|
|
||||||
|
|
@ -827,13 +827,13 @@ public:
|
||||||
m_stack.push_back( MenuPair( menu, "" ) );
|
m_stack.push_back( MenuPair( menu, "" ) );
|
||||||
}
|
}
|
||||||
~EntityClassMenuInserter(){
|
~EntityClassMenuInserter(){
|
||||||
if ( !string_empty( m_previous.c_str() ) ) {
|
if ( !m_previous.empty() ) {
|
||||||
addItem( m_previous.c_str(), "" );
|
addItem( m_previous.c_str(), "" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit( EntityClass* e ){
|
void visit( EntityClass* e ){
|
||||||
ASSERT_MESSAGE( !string_empty( e->name() ), "entity-class has no name" );
|
ASSERT_MESSAGE( !string_empty( e->name() ), "entity-class has no name" );
|
||||||
if ( !string_empty( m_previous.c_str() ) ) {
|
if ( !m_previous.empty() ) {
|
||||||
addItem( m_previous.c_str(), e->name() );
|
addItem( m_previous.c_str(), e->name() );
|
||||||
}
|
}
|
||||||
m_previous = e->name();
|
m_previous = e->name();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user