0ad/source/dcdt/se/sr_path_array.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

30 lines
629 B
C++

#include "precompiled.h"
#include "0ad_warning_disable.h"
# include "sr_path_array.h"
//# define SR_USE_TRACE1
# include "sr_trace.h"
//====================== SrPathArray ==========================
void SrPathArray::basedir_from_filename ( const char* file )
{
_basedir = file;
_basedir.remove_file_name();
_basedir.make_valid_path();
}
bool SrPathArray::adjust_path ( SrString& file )
{
SrInput in;
if ( open(in,file) )
{ file = in.filename();
return true;
}
else
{ return false;
}
}
//=========================== EOF ===============================