Commit 99fb09f5 authored by Antoine Regimbeau's avatar Antoine Regimbeau

REFAC: include what you use and remove itkNotUsed

parent 9974b898
......@@ -29,10 +29,10 @@
#include "itk_kwiml.h"
#endif
#include <string>
#include <boost/cstdint.hpp>
#include "itkLoggerBase.h"
#include "OTBCommonExport.h"
#include <stdint.h> // for uint64_t
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
#include "itkLoggerBase.h" // for LoggerBase, LoggerBase::PriorityLevelType
namespace otb
{
......
......@@ -21,13 +21,14 @@
#ifndef otbExtendedFilenameHelper_h
#define otbExtendedFilenameHelper_h
#include <map>
#include <vector>
#include "itkObject.h"
#include <iosfwd> // for ostream
#include <string> // for string
#include <utility> // for pair
#include "itkObjectFactory.h"
#include "OTBCommonExport.h"
#include <string>
#include "itkMacro.h" // for itkGetStringMacro, ExtendedFilenameHelp...
#include "itkSmartPointer.h" // for SmartPointer
#include "itkObject.h" // for Object
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
namespace otb
{
......
......@@ -22,11 +22,15 @@
#ifndef otbImageRegionAdaptativeSplitter_h
#define otbImageRegionAdaptativeSplitter_h
#include "itkRegion.h"
#include "itkImageRegionSplitter.h"
#include "itkIndex.h"
#include "itkSize.h"
#include "itkFastMutexLock.h"
#include <iosfwd> // for ostream
#include "itkImageRegion.h" // for ImageRegion
#include "itkIndent.h" // for Indent
#include "itkMacro.h" // for itkGetConstReferenceMacro, itkSe...
#include "itkSimpleFastMutexLock.h" // for SimpleFastMutexLock
#include "itkSmartPointer.h" // for SmartPointer
#include "itkImageRegionSplitter.h" // for ImageRegionSplitter
#include "itkIndex.h" // for Index
#include "itkSize.h" // for Size
namespace otb
{
......
......@@ -22,11 +22,14 @@
#ifndef otbImageRegionNonUniformMultidimensionalSplitter_h
#define otbImageRegionNonUniformMultidimensionalSplitter_h
#include "itkRegion.h"
#include "itkObjectFactory.h"
#include "itkIndex.h"
#include "itkSize.h"
#include "itkImageRegionSplitter.h"
#include <iosfwd> // for ostream
#include "itkImageRegion.h" // for ImageRegion
#include "itkIndent.h" // for Indent
#include "itkMacro.h" // for ITK_EXPORT, ImageRegionNonUnifor...
#include "itkSmartPointer.h" // for SmartPointer
#include "itkImageRegionSplitter.h" // for ImageRegionSplitter
#include "itkIndex.h" // for Index
#include "itkSize.h" // for Size
namespace otb
{
......
......@@ -22,11 +22,15 @@
#ifndef otbImageRegionSquareTileSplitter_h
#define otbImageRegionSquareTileSplitter_h
#include "itkRegion.h"
#include "itkImageRegionSplitter.h"
#include "itkObjectFactory.h"
#include "itkIndex.h"
#include "itkSize.h"
#include <iosfwd> // for ostream
#include "itkFixedArray.h" // for FixedArray
#include "itkImageRegion.h" // for ImageRegion
#include "itkIndent.h" // for Indent
#include "itkMacro.h" // for itkGetMacro, ITK_EXPORT, ImageRe...
#include "itkSmartPointer.h" // for SmartPointer
#include "itkImageRegionSplitter.h" // for ImageRegionSplitter
#include "itkIndex.h" // for Index
#include "itkSize.h" // for Size
namespace otb
{
......
......@@ -63,7 +63,7 @@ ImageRegionSquareTileSplitter<VImageDimension>
template <unsigned int VImageDimension>
itk::ImageRegion<VImageDimension>
ImageRegionSquareTileSplitter<VImageDimension>
::GetSplit(unsigned int i, unsigned int itkNotUsed(numberOfPieces), const RegionType& region)
::GetSplit(unsigned int i, unsigned int , const RegionType& region)
{
RegionType splitRegion;
IndexType splitIndex;
......
......@@ -22,11 +22,14 @@
#ifndef otbImageRegionTileMapSplitter_h
#define otbImageRegionTileMapSplitter_h
#include "itkRegion.h"
#include "itkImageRegionSplitter.h"
#include "itkObjectFactory.h"
#include "itkIndex.h"
#include "itkSize.h"
#include <iosfwd> // for ostream
#include "itkImageRegion.h" // for ImageRegion
#include "itkIndent.h" // for Indent
#include "itkMacro.h" // for ITK_EXPORT, ImageRegionTileMapSp...
#include "itkSmartPointer.h" // for SmartPointer
#include "itkImageRegionSplitter.h" // for ImageRegionSplitter
#include "itkIndex.h" // for Index
#include "itkSize.h" // for Size
namespace otb
{
......
......@@ -21,11 +21,12 @@
#ifndef otbLogger_h
#define otbLogger_h
#include <string>
#include "itkLoggerBase.h"
#include "itkLogger.h"
#include "OTBCommonExport.h"
#include <string> // for string
#include "itkMacro.h" // for Logger::Clone, Logger::CreateAnother
#include "itkSmartPointer.h" // for SmartPointer
#include "itkLogger.h" // for Logger
#include "itkLoggerBase.h" // for LoggerBase::PriorityLevelType
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
namespace otb {
......
......@@ -21,9 +21,14 @@
#ifndef otbRectangle_h
#define otbRectangle_h
#include "itkImageRegion.h"
#include "itkVectorContainer.h"
#include <iosfwd> // for ostream
#include "itkContinuousIndex.h" // for ContinuousIndex
#include "itkIndent.h" // for Indent
#include "itkMacro.h" // for itkGetMacro, itkSetMacro, ITK_EXPORT
#include "itkObject.h" // for Object
#include "itkSmartPointer.h" // for SmartPointer
#include "itkImageRegion.h" // for ImageRegion
#include "itkVectorContainer.h" // for VectorContainer
namespace otb
{
......
......@@ -22,7 +22,10 @@
#ifndef otbStandardFilterWatcher_h
#define otbStandardFilterWatcher_h
#include "otbFilterWatcherBase.h"
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
#include "otbFilterWatcherBase.h" // for FilterWatcherBase
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -22,9 +22,10 @@
#ifndef otbStandardOneLineFilterWatcher_h
#define otbStandardOneLineFilterWatcher_h
#include <iosfwd>
#include "otbFilterWatcherBase.h"
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
#include "otbFilterWatcherBase.h" // for FilterWatcherBase
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -22,11 +22,10 @@
#ifndef otbStandardWriterWatcher_h
#define otbStandardWriterWatcher_h
#include <iosfwd>
#include "otbWriterWatcherBase.h"
#include "OTBCommonExport.h"
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
#include "otbWriterWatcherBase.h" // for WriterWatcherBase
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -21,9 +21,9 @@
#ifndef otbStringToHTML_h
#define otbStringToHTML_h
#include <string>
#include "OTBCommonExport.h"
#include <iosfwd> // for ostream
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
namespace otb
{
......
......@@ -21,13 +21,10 @@
#ifndef otbSystem_h
#define otbSystem_h
#include <string>
#include <string> // for string
#include <vector>
#include "itksys/SystemTools.hxx"
#include "itkMacro.h"
#include "OTBCommonExport.h"
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
namespace otb
{
......
......@@ -21,11 +21,9 @@
#ifndef otbUtils_h
#define otbUtils_h
#include <sstream>
#include <string>
#include "itkMacro.h"
#include "OTBCommonExport.h"
#include <sstream> // for stringstream
#include <string> // for string
#include "OTBCommonExport.h" // for OTBCommon_EXPORT
namespace otb
{
......@@ -38,10 +36,10 @@ namespace otb
*
* \ingroup OTBCommon
*/
namespace Utils
namespace Utils OTBCommon_EXPORT
{
/** Check that the values for lon, lat are reasonable */
bool OTBCommon_EXPORT IsLonLatValid(double lon, double lat);
bool IsLonLatValid(double lon, double lat);
template <class T>
inline std::string ConvertToString (const T& v)
......@@ -52,11 +50,11 @@ namespace Utils
}
/** Function that prints nothing (useful to disable libsvm logs)*/
void OTBCommon_EXPORT PrintNothing(const char *s);
void PrintNothing(const char *s);
extern OTBCommon_EXPORT bool const TrueConstant;
extern bool const TrueConstant;
extern OTBCommon_EXPORT bool const FalseConstant;
extern bool const FalseConstant;
}
} // namespace otb
......
......@@ -18,21 +18,16 @@
* limitations under the License.
*/
#include "otbConfigurationManager.h"
#include "otbMacro.h"
#include "otbLogger.h"
#include <string> // for string
#include "itkLoggerBase.h" // for LoggerBase, LoggerBase::::INFO, LoggerBas...
#include "itksys/SystemTools.hxx"
#include <cstdlib>
#include <algorithm>
#include <string>
#include "otbConfigurationManager.h"
#include "otbMacro.h" // for otbLogMacro
namespace otb
{
namespace ConfigurationManager
namespace ConfigurationManager OTBCommon_EXPORT
{
std::string GetDEMDirectory()
......
......@@ -19,15 +19,12 @@
*/
#include "otbExtendedFilenameHelper.h"
#include <cassert>
#include <ostream>
#include <stdexcept>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <cassert> // for assert
#include <ostream> // for ostream
#include <stdexcept> // for range_error
#include <string> // for string
#include "otb_boost_string_header.h"
#include "otbStringUtils.h"
......
......@@ -20,6 +20,7 @@
*/
#include "otbFilterWatcherBase.h"
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -18,13 +18,13 @@
* limitations under the License.
*/
#include <iostream> // for ostringstream
#include "otbLogger.h"
#include "itksys/SystemTools.hxx"
#include "itkStdStreamLogOutput.h" // for StdStreamLogOutput, StdStreamLogO...
#include "otbConfigurationManager.h"
#include "itkStdStreamLogOutput.h"
#include <iostream>
#include "gdal.h"
#include "itkMultiThreader.h"
#include "itksys/SystemTools.hxx"
namespace otb
{
......
......@@ -20,6 +20,9 @@
*/
#include "otbStandardFilterWatcher.h"
#include <iostream> // for cout
#include "otbStopwatch.h" // for Stopwatch
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -19,11 +19,10 @@
* limitations under the License.
*/
#include <iostream>
#include <sstream>
#include "otbStandardOneLineFilterWatcher.h"
#include "otbStopwatch.h"
#include <iostream> // for cout
#include "otbStopwatch.h" // for Stopwatch
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -19,10 +19,11 @@
* limitations under the License.
*/
#include <iostream>
#include "otbStandardWriterWatcher.h"
#include "otbStopwatch.h"
#include <iosfwd> // for ostringstream
#include <iostream> // for cout
#include "otbStopwatch.h" // for Stopwatch
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -18,12 +18,11 @@
* limitations under the License.
*/
#include "otbStopwatch.h"
#include <chrono>
#include <sstream>
#include <iomanip>
#include "otbStopwatch.h"
namespace otb
{
void
......
......@@ -20,8 +20,8 @@
#include "otbSystem.h"
#include <string> // strdup
#include <cstdlib>
#include <cstddef> // for size_t
#include <string> // for string
#if (defined(WIN32) || defined(WIN32CE)) && !defined(__CYGWIN__) && !defined(__MINGW32__)
......@@ -44,7 +44,7 @@
namespace otb
{
namespace System
namespace System OTBCommon_EXPORT
{
//GetRootName from uiig library.
std::string GetRootName(const std::string& filename)
......
......@@ -24,7 +24,7 @@
namespace otb
{
namespace Utils
namespace Utils OTBCommon_EXPORT
{
bool IsLonLatValid(double lon, double lat)
......
......@@ -20,6 +20,7 @@
*/
#include "otbWriterWatcherBase.h"
namespace itk { class ProcessObject; }
namespace otb
{
......
......@@ -28,7 +28,7 @@ typedef RegionType::SizeType SizeType;
typedef RegionType::IndexType IndexType;
int otbImageRegionAdaptativeSplitter(int itkNotUsed(argc), char * argv[])
int otbImageRegionAdaptativeSplitter(int , char * argv[])
{
SizeType regionSize, tileHint;
IndexType regionIndex;
......
......@@ -21,7 +21,7 @@
#include "otbImageRegionNonUniformMultidimensionalSplitter.h"
#include <fstream>
int otbImageRegionNonUniformMultidimensionalSplitter(int itkNotUsed(argc), char * argv[])
int otbImageRegionNonUniformMultidimensionalSplitter(int , char * argv[])
{
const int Dimension = 2;
typedef otb::ImageRegionNonUniformMultidimensionalSplitter<Dimension> FilterType;
......
......@@ -75,7 +75,7 @@ int TestSplitter(const RegionType& region, unsigned int PixelSize, unsigned int
}
int otbImageRegionSquareTileSplitter(int itkNotUsed(argc), char * argv[])
int otbImageRegionSquareTileSplitter(int , char * argv[])
{
std::ofstream outfile(argv[1]);
RegionType region;
......
......@@ -21,7 +21,7 @@
#include "otbImageRegionTileMapSplitter.h"
#include <fstream>
int otbImageRegionTileMapSplitter(int itkNotUsed(argc), char * argv[])
int otbImageRegionTileMapSplitter(int , char * argv[])
{
const int Dimension = 2;
......
......@@ -25,7 +25,7 @@
#include "otbRGBAPixelConverter.h"
int otbRGBAPixelConverter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
int otbRGBAPixelConverter(int , char * [])
{
typedef unsigned int PixelType0;
typedef double PixelType1;
......
......@@ -23,7 +23,7 @@
#include <iostream>
#include <fstream>
int otbRectangle(int itkNotUsed(argc), char * argv[])
int otbRectangle(int , char * argv[])
{
const char * outfname = argv[1];
......
......@@ -25,7 +25,7 @@
#include "otbStandardFilterWatcher.h"
#include "itkGradientMagnitudeImageFilter.h"
int otbStandardFilterWatcherNew(int itkNotUsed(argc), char * argv[])
int otbStandardFilterWatcherNew(int , char * argv[])
{
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
......
......@@ -25,7 +25,7 @@
#include "otbStandardOneLineFilterWatcher.h"
#include "itkGradientMagnitudeImageFilter.h"
int otbStandardOneLineFilterWatcherTest(int itkNotUsed(argc), char * argv[])
int otbStandardOneLineFilterWatcherTest(int , char * argv[])
{
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
......
......@@ -27,7 +27,7 @@
#include "otbImageFileWriter.h"
#include "otbImageFileWriter.h"
int otbStandardWriterWatcher(int itkNotUsed(argc), char * argv[])
int otbStandardWriterWatcher(int , char * argv[])
{
const char * infname = argv[1];
const char * outfname = argv[2];
......
......@@ -31,7 +31,7 @@
using namespace std::chrono_literals;
int otbStopwatchTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
int otbStopwatchTest(int itkNotUsed(argc), char * [])
{
otb::Stopwatch sw;
......
......@@ -21,11 +21,13 @@
#include <iostream>
#include <cstdlib>
#include <sstream>
#include "itksys/SystemTools.hxx"
#include "itkMacro.h"
#include "otbSystem.h"
int otbSystemTest(int itkNotUsed(argc), char * argv[])
int otbSystemTest(int , char * argv[])
{
const char * inputFileName = argv[1];
const char * inputDirName = argv[2];
......@@ -52,7 +54,7 @@ int otbSystemTest(int itkNotUsed(argc), char * argv[])
}
int otbParseHdfSubsetName(int itkNotUsed(argc), char * itkNotUsed(argv) [])
int otbParseHdfSubsetName(int , char * [])
{
std::string input("");
std::string key("");
......@@ -70,7 +72,7 @@ int otbParseHdfSubsetName(int itkNotUsed(argc), char * itkNotUsed(argv) [])
return EXIT_SUCCESS;
}
int otbParseHdfFileName(int itkNotUsed(argc), char * itkNotUsed(argv) [])
int otbParseHdfFileName(int , char * [])
{
std::string id("");
std::string file("");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment