aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/native/TexturePacker/src/DecoderManager.cpp
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2023-04-13 10:16:19 -0700
committerLukas Rusak <lorusak@gmail.com>2023-04-14 20:45:47 -0700
commit1f026487650069eb871061e9004cf81737e756a5 (patch)
tree112d46b683154c3c82ad4c09361eced1c0ee42c2 /tools/depends/native/TexturePacker/src/DecoderManager.cpp
parentc94daf9f1af0892167737ba41ea85166c676ecce (diff)
TexturePacker: DecoderManager use range based for loop
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Diffstat (limited to 'tools/depends/native/TexturePacker/src/DecoderManager.cpp')
-rw-r--r--tools/depends/native/TexturePacker/src/DecoderManager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/depends/native/TexturePacker/src/DecoderManager.cpp b/tools/depends/native/TexturePacker/src/DecoderManager.cpp
index 352e001a9d..d5b06989b7 100644
--- a/tools/depends/native/TexturePacker/src/DecoderManager.cpp
+++ b/tools/depends/native/TexturePacker/src/DecoderManager.cpp
@@ -40,9 +40,9 @@ bool DecoderManager::IsSupportedGraphicsFile(char *strFileName)
if (filename.length() < 4)
return false;
- for (unsigned int i = 0; i < m_decoders.size(); i++)
+ for (const auto& decoder : m_decoders)
{
- const std::vector<std::string> extensions = m_decoders[i]->GetSupportedExtensions();
+ const std::vector<std::string> extensions = decoder->GetSupportedExtensions();
for (unsigned int n = 0; n < extensions.size(); n++)
{
int extLen = extensions[n].length();
@@ -57,14 +57,14 @@ bool DecoderManager::IsSupportedGraphicsFile(char *strFileName)
bool DecoderManager::LoadFile(const std::string &filename, DecodedFrames &frames)
{
- for (unsigned int i = 0; i < m_decoders.size(); i++)
+ for (const auto& decoder : m_decoders)
{
- if (m_decoders[i]->CanDecode(filename))
+ if (decoder->CanDecode(filename))
{
if (verbose)
- fprintf(stdout, "This is a %s - lets load it via %s...\n",
- m_decoders[i]->GetImageFormatName(), m_decoders[i]->GetDecoderName());
- return m_decoders[i]->LoadFile(filename, frames);
+ fprintf(stdout, "This is a %s - lets load it via %s...\n", decoder->GetImageFormatName(),
+ decoder->GetDecoderName());
+ return decoder->LoadFile(filename, frames);
}
}
return false;