IVGCVSW-5405 Remove boost::make_iterator_range and boost::to_upper_copy
* Removed from ModelAccuracyTool-Armnn and ImageCSVFileGenerator
* Fixed formatting in ImageCSVFileGenerator
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I09dfca27813582cc48f46d0507680368ed823a9c
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index edc7e1c..dccf5ff 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -10,7 +10,6 @@
#include <Filesystem.hpp>
#include <boost/program_options/variables_map.hpp>
-#include <boost/range/iterator_range.hpp>
#include <map>
using namespace armnn::test;
@@ -391,11 +390,14 @@
{
// Populate imageFilenames with names of all .JPEG, .PNG images
std::vector<std::string> imageFilenames;
- for (const auto& imageEntry :
- boost::make_iterator_range(fs::directory_iterator(fs::path(imageDirectoryPath))))
+ for (const auto& imageEntry : fs::directory_iterator(fs::path(imageDirectoryPath)))
{
fs::path imagePath = imageEntry.path();
- std::string imageExtension = boost::to_upper_copy<std::string>(imagePath.extension().string());
+
+ // Get extension and convert to uppercase
+ std::string imageExtension = imagePath.extension().string();
+ std::transform(imageExtension.begin(), imageExtension.end(), imageExtension.begin(), ::toupper);
+
if (fs::is_regular_file(imagePath) && (imageExtension == ".JPEG" || imageExtension == ".PNG"))
{
imageFilenames.push_back(imagePath.filename().string());