summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagetga.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
commit25c10ed028da5c547b11f1f461916897272b0e6d (patch)
tree350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/llimage/llimagetga.cpp
parent6dd125d375b38455997a0c4b8747659f4c2351aa (diff)
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/llimage/llimagetga.cpp')
-rw-r--r--indra/llimage/llimagetga.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp
index a9fc02bf8d..c8689f6669 100644
--- a/indra/llimage/llimagetga.cpp
+++ b/indra/llimage/llimagetga.cpp
@@ -30,6 +30,7 @@
#include "linden_common.h"
+#include "lldir.h"
#include "llimagetga.h"
#include "llerror.h"
#include "llmath.h"
@@ -90,7 +91,7 @@ LLImageTGA::LLImageTGA()
{
}
-LLImageTGA::LLImageTGA(const LLString& file_name)
+LLImageTGA::LLImageTGA(const std::string& file_name)
: LLImageFormatted(IMG_CODEC_TGA),
mColorMap( NULL ),
mColorMapStart( 0 ),
@@ -1136,7 +1137,7 @@ BOOL LLImageTGA::decodeAndProcess( LLImageRaw* raw_image, F32 domain, F32 weight
}
// Reads a .tga file and creates an LLImageTGA with its data.
-bool LLImageTGA::loadFile( const LLString& path )
+bool LLImageTGA::loadFile( const std::string& path )
{
S32 len = path.size();
if( len < 5 )
@@ -1144,14 +1145,13 @@ bool LLImageTGA::loadFile( const LLString& path )
return false;
}
- LLString extension = path.substr( len - 4, 4 );
- LLString::toLower(extension);
- if( ".tga" != extension )
+ std::string extension = gDirUtilp->getExtension(path);
+ if( "tga" != extension )
{
return false;
}
- LLFILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */
+ LLFILE* file = LLFile::fopen(path, "rb"); /* Flawfinder: ignore */
if( !file )
{
llwarns << "Couldn't open file " << path << llendl;