diff --git a/docs/concepts/overview/internal_architecture.rst b/docs/concepts/overview/internal_architecture.rst index 387aa724a1..ae5fd86261 100644 --- a/docs/concepts/overview/internal_architecture.rst +++ b/docs/concepts/overview/internal_architecture.rst @@ -135,7 +135,7 @@ Example: } catch(OCIO::Exception & exception) { - std::cerr << "OpenColorIO Error: " << exception.what() << std::endl; + std::cerr << "OpenColorIO Error: " << exception.what() << "\n"; } diff --git a/docs/guides/developing/usage_examples.rst b/docs/guides/developing/usage_examples.rst index e62b80f868..53a4c646f6 100644 --- a/docs/guides/developing/usage_examples.rst +++ b/docs/guides/developing/usage_examples.rst @@ -80,7 +80,7 @@ C++ } catch(OCIO::Exception & exception) { - std::cerr << "OpenColorIO Error: " << exception.what() << std::endl; + std::cerr << "OpenColorIO Error: " << exception.what() << "\n"; } .. _usage_applybasic_python: @@ -149,7 +149,7 @@ C++ } catch(OCIO::Exception & exception) { - std::cerr << "OpenColorIO Error: " << exception.what() << std::endl; + std::cerr << "OpenColorIO Error: " << exception.what() << "\n"; } Python diff --git a/include/OpenColorIO/OpenColorIO.h b/include/OpenColorIO/OpenColorIO.h index ad294fc805..b85e0e825e 100644 --- a/include/OpenColorIO/OpenColorIO.h +++ b/include/OpenColorIO/OpenColorIO.h @@ -10,10 +10,10 @@ #include #include #include -#include #include #include #include +#include #include "OpenColorABI.h" #include "OpenColorTypes.h" @@ -53,7 +53,7 @@ C++ API } catch(OCIO::Exception & exception) { - std::cerr << "OpenColorIO Error: " << exception.what() << std::endl; + std::cerr << "OpenColorIO Error: " << exception.what() << "\n"; } */ diff --git a/include/OpenColorIO/OpenColorTransforms.h b/include/OpenColorIO/OpenColorTransforms.h index 8ef04be8c8..e7f63baa91 100644 --- a/include/OpenColorIO/OpenColorTransforms.h +++ b/include/OpenColorIO/OpenColorTransforms.h @@ -6,7 +6,6 @@ #define INCLUDED_OCIO_OPENCOLORTRANSFORMS_H #include -#include #include "OpenColorTypes.h" diff --git a/include/OpenColorIO/OpenColorTypes.h b/include/OpenColorIO/OpenColorTypes.h index 8fa5833749..366d1fae06 100644 --- a/include/OpenColorIO/OpenColorTypes.h +++ b/include/OpenColorIO/OpenColorTypes.h @@ -12,7 +12,6 @@ #endif #include -#include #include #include diff --git a/src/OpenColorIO/Baker.cpp b/src/OpenColorIO/Baker.cpp index e92a4f3d31..2271b8bade 100755 --- a/src/OpenColorIO/Baker.cpp +++ b/src/OpenColorIO/Baker.cpp @@ -2,13 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include +#include #include #include "transforms/FileTransform.h" #include "BakingUtils.h" -#include "MathUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/BakingUtils.cpp b/src/OpenColorIO/BakingUtils.cpp index 0929fa10c5..fa66f4ec31 100644 --- a/src/OpenColorIO/BakingUtils.cpp +++ b/src/OpenColorIO/BakingUtils.cpp @@ -1,6 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "BakingUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/BitDepthUtils.cpp b/src/OpenColorIO/BitDepthUtils.cpp index 7c503fa9a8..60dd48b7a7 100644 --- a/src/OpenColorIO/BitDepthUtils.cpp +++ b/src/OpenColorIO/BitDepthUtils.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include #include "BitDepthUtils.h" diff --git a/src/OpenColorIO/CPUInfo.cpp b/src/OpenColorIO/CPUInfo.cpp index edf341792b..869cc81a7b 100644 --- a/src/OpenColorIO/CPUInfo.cpp +++ b/src/OpenColorIO/CPUInfo.cpp @@ -3,7 +3,7 @@ #include "CPUInfo.h" -#include +#include #if _WIN32 #include @@ -11,7 +11,7 @@ typedef unsigned __int32 uint32_t; typedef __int64 int64_t; #else -#include +#include #endif namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/CPUProcessor.cpp b/src/OpenColorIO/CPUProcessor.cpp index 033083aed3..73783f36ba 100644 --- a/src/OpenColorIO/CPUProcessor.cpp +++ b/src/OpenColorIO/CPUProcessor.cpp @@ -1,16 +1,16 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include #include "BitDepthUtils.h" #include "CPUProcessor.h" #include "ops/lut1d/Lut1DOpCPU.h" -#include "ops/lut3d/Lut3DOpCPU.h" #include "ops/matrix/MatrixOp.h" -#include "ops/range/RangeOpCPU.h" #include "ScanlineHelper.h" diff --git a/src/OpenColorIO/ColorSpace.cpp b/src/OpenColorIO/ColorSpace.cpp index 98f776fe18..87a1486458 100644 --- a/src/OpenColorIO/ColorSpace.cpp +++ b/src/OpenColorIO/ColorSpace.cpp @@ -3,14 +3,16 @@ #include #include +#include #include +#include #include +#include #include #include "TokensManager.h" #include "Platform.h" -#include "PrivateTypes.h" #include "utils/StringUtils.h" @@ -255,8 +257,7 @@ void ColorSpace::setInteropID(const char * interopID) { std::ostringstream oss; oss << "InteropID '" << id << "' contains invalid characters. " - "Only lowercase a-z, 0-9 and . - _ ~ / * # % ^ + ( ) [ ] | are allowed." << - std::endl; + "Only lowercase a-z, 0-9 and . - _ ~ / * # % ^ + ( ) [ ] | are allowed.\n"; throw Exception(oss.str().c_str()); } @@ -273,8 +274,7 @@ void ColorSpace::setInteropID(const char * interopID) { std::ostringstream oss; oss << "InteropID '" << id << "' is not valid. " - "If ':' is used, both the namespace and the color space parts must be non-empty." << - std::endl; + "If ':' is used, both the namespace and the color space parts must be non-empty.\n"; throw Exception(oss.str().c_str()); } @@ -283,8 +283,7 @@ void ColorSpace::setInteropID(const char * interopID) { std::ostringstream oss; oss << "ERROR: InteropID '" << id << "' is not valid. " - "Only one ':' is allowed to separate the namespace and the color space." << - std::endl; + "Only one ':' is allowed to separate the namespace and the color space.\n"; throw Exception(oss.str().c_str()); } } diff --git a/src/OpenColorIO/ColorSpaceSet.cpp b/src/OpenColorIO/ColorSpaceSet.cpp index 99c659a61b..2bb3f7151a 100644 --- a/src/OpenColorIO/ColorSpaceSet.cpp +++ b/src/OpenColorIO/ColorSpaceSet.cpp @@ -3,10 +3,10 @@ #include #include +#include #include -#include "PrivateTypes.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/Config.cpp b/src/OpenColorIO/Config.cpp index 2ac0572443..351b3a2a83 100644 --- a/src/OpenColorIO/Config.cpp +++ b/src/OpenColorIO/Config.cpp @@ -11,12 +11,13 @@ #include #include #include +#include +#include #include #include -#include "builtinconfigs/BuiltinConfigRegistry.h" #include "ConfigUtils.h" #include "ContextVariableUtils.h" #include "Display.h" @@ -27,16 +28,13 @@ #include "LookParse.h" #include "MathUtils.h" #include "Mutex.h" -#include "NamedTransform.h" #include "OCIOYaml.h" #include "OCIOZArchive.h" -#include "OpBuilders.h" #include "ParseUtils.h" #include "PathUtils.h" #include "Platform.h" #include "PrivateTypes.h" #include "Processor.h" -#include "transforms/FileTransform.h" #include "utils/StringUtils.h" #include "ViewingRules.h" #include "SystemMonitor.h" @@ -155,7 +153,7 @@ void GetFileReferences(std::set & files, const ConstTransformRcPtr { if(!transform) return; - if(ConstGroupTransformRcPtr groupTransform = \ + if(ConstGroupTransformRcPtr groupTransform = DynamicPtrCast(transform)) { for(int i=0; igetNumTransforms(); ++i) @@ -163,7 +161,7 @@ void GetFileReferences(std::set & files, const ConstTransformRcPtr GetFileReferences(files, groupTransform->getTransform(i)); } } - else if(ConstFileTransformRcPtr fileTransform = \ + else if(ConstFileTransformRcPtr fileTransform = DynamicPtrCast(transform)) { files.insert(fileTransform->getSrc()); @@ -179,7 +177,7 @@ void GetColorSpaceReferences(std::set & colorSpaceNames, { if(!transform) return; - if(ConstGroupTransformRcPtr groupTransform = \ + if(ConstGroupTransformRcPtr groupTransform = DynamicPtrCast(transform)) { for(int i=0; igetNumTransforms(); ++i) @@ -187,18 +185,18 @@ void GetColorSpaceReferences(std::set & colorSpaceNames, GetColorSpaceReferences(colorSpaceNames, groupTransform->getTransform(i), context); } } - else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = \ + else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = DynamicPtrCast(transform)) { colorSpaceNames.insert(context->resolveStringVar(colorSpaceTransform->getSrc())); colorSpaceNames.insert(context->resolveStringVar(colorSpaceTransform->getDst())); } - else if(ConstDisplayViewTransformRcPtr displayViewTransform = \ + else if(ConstDisplayViewTransformRcPtr displayViewTransform = DynamicPtrCast(transform)) { colorSpaceNames.insert(displayViewTransform->getSrc()); } - else if(ConstLookTransformRcPtr lookTransform = \ + else if(ConstLookTransformRcPtr lookTransform = DynamicPtrCast(transform)) { colorSpaceNames.insert(lookTransform->getSrc()); diff --git a/src/OpenColorIO/ConfigUtils.cpp b/src/OpenColorIO/ConfigUtils.cpp index 9a5ecfcda8..c6290d2459 100644 --- a/src/OpenColorIO/ConfigUtils.cpp +++ b/src/OpenColorIO/ConfigUtils.cpp @@ -1,12 +1,16 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include + #include #include "ConfigUtils.h" #include "MathUtils.h" #include "utils/StringUtils.h" -#include "Logging.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ConfigUtils.h b/src/OpenColorIO/ConfigUtils.h index 4965a6e2d5..a401f01e8f 100644 --- a/src/OpenColorIO/ConfigUtils.h +++ b/src/OpenColorIO/ConfigUtils.h @@ -4,6 +4,8 @@ #ifndef INCLUDED_OCIO_CONFIG_UTILS_H #define INCLUDED_OCIO_CONFIG_UTILS_H +#include + #include namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/Context.cpp b/src/OpenColorIO/Context.cpp index b7e71ae6e7..b5697002ab 100644 --- a/src/OpenColorIO/Context.cpp +++ b/src/OpenColorIO/Context.cpp @@ -2,8 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include +#include #include +#include #include #include @@ -14,9 +15,7 @@ #include "ContextVariableUtils.h" #include "HashUtils.h" #include "Mutex.h" -#include "OCIOZArchive.h" #include "PathUtils.h" -#include "PrivateTypes.h" #include "utils/StringUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/Display.cpp b/src/OpenColorIO/Display.cpp index 4280b99231..b0271ab475 100644 --- a/src/OpenColorIO/Display.cpp +++ b/src/OpenColorIO/Display.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include diff --git a/src/OpenColorIO/Display.h b/src/OpenColorIO/Display.h index 43e1b2cc9c..621e1af383 100644 --- a/src/OpenColorIO/Display.h +++ b/src/OpenColorIO/Display.h @@ -8,11 +8,11 @@ #include #include +#include #include #include "Platform.h" -#include "PrivateTypes.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/Exception.cpp b/src/OpenColorIO/Exception.cpp index 061324e138..af68e0bffd 100644 --- a/src/OpenColorIO/Exception.cpp +++ b/src/OpenColorIO/Exception.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/FileRules.cpp b/src/OpenColorIO/FileRules.cpp index 19cbd47bf7..bb19d8c7f1 100644 --- a/src/OpenColorIO/FileRules.cpp +++ b/src/OpenColorIO/FileRules.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include @@ -1028,7 +1027,7 @@ void UpdateFileRulesFromV1ToV2(const Config & config, FileRulesRcPtr & fileRules else { static constexpr char msg[] - = "The default rule creation falls back to the first color space because "\ + = "The default rule creation falls back to the first color space because " "no suitable color space exists."; LogWarning(msg); diff --git a/src/OpenColorIO/FileRules.h b/src/OpenColorIO/FileRules.h index 9b4d81598f..745a8d0ffa 100644 --- a/src/OpenColorIO/FileRules.h +++ b/src/OpenColorIO/FileRules.h @@ -5,7 +5,7 @@ #ifndef INCLUDED_OCIO_FILERULES_H #define INCLUDED_OCIO_FILERULES_H -#include +#include #include diff --git a/src/OpenColorIO/GpuShader.cpp b/src/OpenColorIO/GpuShader.cpp index 665cee02f1..63ca7d2a8c 100644 --- a/src/OpenColorIO/GpuShader.cpp +++ b/src/OpenColorIO/GpuShader.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include #include @@ -9,10 +8,8 @@ #include -#include "DynamicProperty.h" #include "GpuShader.h" #include "ops/lut3d/Lut3DOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/GpuShaderClassWrapper.cpp b/src/OpenColorIO/GpuShaderClassWrapper.cpp index 675bd47163..80eec52bda 100644 --- a/src/OpenColorIO/GpuShaderClassWrapper.cpp +++ b/src/OpenColorIO/GpuShaderClassWrapper.cpp @@ -2,6 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include +#include +#include +#include +#include #include diff --git a/src/OpenColorIO/GpuShaderClassWrapper.h b/src/OpenColorIO/GpuShaderClassWrapper.h index cbe01b3545..a9754efcb7 100644 --- a/src/OpenColorIO/GpuShaderClassWrapper.h +++ b/src/OpenColorIO/GpuShaderClassWrapper.h @@ -5,8 +5,7 @@ #define INCLUDED_OCIO_GPUSHADERCLASSWRAPPER_H #include -#include -#include +#include #include #include diff --git a/src/OpenColorIO/GpuShaderDesc.cpp b/src/OpenColorIO/GpuShaderDesc.cpp index 574a7c3594..b370614087 100644 --- a/src/OpenColorIO/GpuShaderDesc.cpp +++ b/src/OpenColorIO/GpuShaderDesc.cpp @@ -1,14 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include #include +#include #include -#include "DynamicProperty.h" #include "GpuShader.h" -#include "GpuShaderUtils.h" #include "GpuShaderClassWrapper.h" #include "HashUtils.h" #include "Logging.h" @@ -391,10 +391,8 @@ void GpuShaderCreator::finalize() if(IsDebugLoggingEnabled()) { std::ostringstream oss; - oss << std::endl - << "**" << std::endl - << "GPU Fragment Shader program" << std::endl - << getImpl()->m_shaderCode << std::endl; + oss << "\n**\nGPU Fragment Shader program\n" + << getImpl()->m_shaderCode << "\n"; LogDebug(oss.str()); } diff --git a/src/OpenColorIO/GpuShaderUtils.cpp b/src/OpenColorIO/GpuShaderUtils.cpp index fa1ca43fb2..e7fc87d4d1 100644 --- a/src/OpenColorIO/GpuShaderUtils.cpp +++ b/src/OpenColorIO/GpuShaderUtils.cpp @@ -1,7 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include @@ -336,7 +338,7 @@ void GpuShaderText::flushLine() m_ossText << std::string(tabSize * m_indent, ' ') << m_ossLine.str() - << std::endl; + << "\n"; m_ossLine.str(""); m_ossLine.clear(); diff --git a/src/OpenColorIO/ImageDesc.cpp b/src/OpenColorIO/ImageDesc.cpp index 2f045f1597..cdfa4ff4fd 100644 --- a/src/OpenColorIO/ImageDesc.cpp +++ b/src/OpenColorIO/ImageDesc.cpp @@ -2,8 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include +#include +#include +#include #include diff --git a/src/OpenColorIO/ImagePacking.cpp b/src/OpenColorIO/ImagePacking.cpp index 3c24c9a58f..27eade0c15 100644 --- a/src/OpenColorIO/ImagePacking.cpp +++ b/src/OpenColorIO/ImagePacking.cpp @@ -1,16 +1,11 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include -#include -#include -#include #include -#include "BitDepthUtils.h" +#include + #include "ImagePacking.h" diff --git a/src/OpenColorIO/Logging.cpp b/src/OpenColorIO/Logging.cpp index e40692db7c..dde2b452ad 100644 --- a/src/OpenColorIO/Logging.cpp +++ b/src/OpenColorIO/Logging.cpp @@ -1,16 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include #include #include "Logging.h" #include "Mutex.h" #include "Platform.h" -#include "PrivateTypes.h" #include "utils/StringUtils.h" @@ -44,8 +42,8 @@ void InitLogging() if(g_logginglevel == LOGGING_LEVEL_UNKNOWN) { - std::cerr << "[OpenColorIO Warning]: Invalid $OCIO_LOGGING_LEVEL specified. "; - std::cerr << "Options: none (0), warning (1), info (2), debug (3)" << std::endl; + std::cerr << "[OpenColorIO Warning]: Invalid $OCIO_LOGGING_LEVEL specified. " + "Options: none (0), warning (1), info (2), debug (3)\n"; g_logginglevel = LOGGING_LEVEL_DEFAULT; } } diff --git a/src/OpenColorIO/Look.cpp b/src/OpenColorIO/Look.cpp index 14af742350..49371eb165 100644 --- a/src/OpenColorIO/Look.cpp +++ b/src/OpenColorIO/Look.cpp @@ -2,9 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. -#include #include -#include #include @@ -78,7 +76,7 @@ Look::Look() Look::~Look() { delete m_impl; - m_impl = NULL; + m_impl = nullptr; } LookRcPtr Look::createEditableCopy() const diff --git a/src/OpenColorIO/LookParse.cpp b/src/OpenColorIO/LookParse.cpp index e70a09cf4b..29a8f6ae63 100644 --- a/src/OpenColorIO/LookParse.cpp +++ b/src/OpenColorIO/LookParse.cpp @@ -2,7 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include +#include #include diff --git a/src/OpenColorIO/MathUtils.cpp b/src/OpenColorIO/MathUtils.cpp index 468773c57c..a2a94094ab 100644 --- a/src/OpenColorIO/MathUtils.cpp +++ b/src/OpenColorIO/MathUtils.cpp @@ -3,9 +3,9 @@ #include -#include -#include +#include #include +#include #include diff --git a/src/OpenColorIO/Mutex.h b/src/OpenColorIO/Mutex.h index e296abdb46..372e93c590 100644 --- a/src/OpenColorIO/Mutex.h +++ b/src/OpenColorIO/Mutex.h @@ -7,9 +7,11 @@ #include -#include -#include +#include +#ifndef NDEBUG +#include +#endif /** For internal use only */ diff --git a/src/OpenColorIO/OCIOYaml.cpp b/src/OpenColorIO/OCIOYaml.cpp index c9361579fe..a9986220c8 100644 --- a/src/OpenColorIO/OCIOYaml.cpp +++ b/src/OpenColorIO/OCIOYaml.cpp @@ -2,7 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include +#include +#include +#include +#include +#include #include +#include #include @@ -14,11 +22,8 @@ #include "MathUtils.h" #include "OCIOYaml.h" #include "ops/exposurecontrast/ExposureContrastOpData.h" -#include "ops/gradingprimary/GradingPrimaryOpData.h" #include "ops/gradingrgbcurve/GradingRGBCurve.h" #include "ops/gradinghuecurve/GradingHueCurve.h" -#include "ops/gradingtone/GradingToneOpData.h" -#include "ops/log/LogUtils.h" #include "ParseUtils.h" #include "PathUtils.h" #include "Platform.h" @@ -3352,67 +3357,67 @@ void load(const YAML::Node& node, TransformRcPtr& t) void save(YAML::Emitter& out, ConstTransformRcPtr t, unsigned int majorVersion) { - if(ConstAllocationTransformRcPtr Allocation_tran = \ + if(ConstAllocationTransformRcPtr Allocation_tran = DynamicPtrCast(t)) save(out, Allocation_tran); - else if (ConstBuiltinTransformRcPtr builtin_tran = \ + else if (ConstBuiltinTransformRcPtr builtin_tran = DynamicPtrCast(t)) save(out, builtin_tran); - else if(ConstCDLTransformRcPtr CDL_tran = \ + else if(ConstCDLTransformRcPtr CDL_tran = DynamicPtrCast(t)) save(out, CDL_tran, majorVersion); - else if(ConstColorSpaceTransformRcPtr ColorSpace_tran = \ + else if(ConstColorSpaceTransformRcPtr ColorSpace_tran = DynamicPtrCast(t)) save(out, ColorSpace_tran); - else if (ConstDisplayViewTransformRcPtr Display_tran = \ + else if (ConstDisplayViewTransformRcPtr Display_tran = DynamicPtrCast(t)) save(out, Display_tran); - else if(ConstExponentTransformRcPtr Exponent_tran = \ + else if(ConstExponentTransformRcPtr Exponent_tran = DynamicPtrCast(t)) save(out, Exponent_tran, majorVersion); - else if (ConstExponentWithLinearTransformRcPtr ExpLinear_tran = \ + else if (ConstExponentWithLinearTransformRcPtr ExpLinear_tran = DynamicPtrCast(t)) save(out, ExpLinear_tran); - else if(ConstFileTransformRcPtr File_tran = \ + else if(ConstFileTransformRcPtr File_tran = DynamicPtrCast(t)) save(out, File_tran, majorVersion); - else if (ConstExposureContrastTransformRcPtr File_tran = \ + else if (ConstExposureContrastTransformRcPtr File_tran = DynamicPtrCast(t)) save(out, File_tran); - else if(ConstFixedFunctionTransformRcPtr Func_tran = \ + else if(ConstFixedFunctionTransformRcPtr Func_tran = DynamicPtrCast(t)) save(out, Func_tran); - else if (ConstGradingPrimaryTransformRcPtr GP_tran = \ + else if (ConstGradingPrimaryTransformRcPtr GP_tran = DynamicPtrCast(t)) save(out, GP_tran); - else if (ConstGradingRGBCurveTransformRcPtr GC_tran = \ + else if (ConstGradingRGBCurveTransformRcPtr GC_tran = DynamicPtrCast(t)) save(out, GC_tran); - else if (ConstGradingHueCurveTransformRcPtr GC_tran = \ + else if (ConstGradingHueCurveTransformRcPtr GC_tran = DynamicPtrCast(t)) save(out, GC_tran); - else if (ConstGradingToneTransformRcPtr GT_tran = \ + else if (ConstGradingToneTransformRcPtr GT_tran = DynamicPtrCast(t)) save(out, GT_tran); - else if(ConstGroupTransformRcPtr Group_tran = \ + else if(ConstGroupTransformRcPtr Group_tran = DynamicPtrCast(t)) save(out, Group_tran, majorVersion); - else if(ConstLogAffineTransformRcPtr Log_tran = \ + else if(ConstLogAffineTransformRcPtr Log_tran = DynamicPtrCast(t)) save(out, Log_tran); - else if (ConstLogCameraTransformRcPtr Log_tran = \ + else if (ConstLogCameraTransformRcPtr Log_tran = DynamicPtrCast(t)) save(out, Log_tran); - else if(ConstLogTransformRcPtr Log_tran = \ + else if(ConstLogTransformRcPtr Log_tran = DynamicPtrCast(t)) save(out, Log_tran, majorVersion); - else if(ConstLookTransformRcPtr Look_tran = \ + else if(ConstLookTransformRcPtr Look_tran = DynamicPtrCast(t)) save(out, Look_tran); - else if(ConstMatrixTransformRcPtr Matrix_tran = \ + else if(ConstMatrixTransformRcPtr Matrix_tran = DynamicPtrCast(t)) save(out, Matrix_tran, majorVersion); - else if(ConstRangeTransformRcPtr Range_tran = \ + else if(ConstRangeTransformRcPtr Range_tran = DynamicPtrCast(t)) save(out, Range_tran); else @@ -4460,9 +4465,9 @@ inline void load(const YAML::Node& node, ConfigRcPtr & config, const char* filen << "." << profile_minor_version << ". "; - os << "This version of the OpenColorIO library (" << GetVersion() << ") "; - os << "is not able to load that config version."; - os << std::endl << ex.what(); + os << "This version of the OpenColorIO library (" << GetVersion() << ") " + "is not able to load that config version.\n"; + os << ex.what(); throw Exception(os.str().c_str()); } diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp index 982fce6823..53617b0199 100644 --- a/src/OpenColorIO/OCIOZArchive.cpp +++ b/src/OpenColorIO/OCIOZArchive.cpp @@ -2,17 +2,17 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include #include #include -#include -#include +#include +#include #include #include -#include "Mutex.h" #include "Platform.h" #include "utils/StringUtils.h" #include "transforms/FileTransform.h" diff --git a/src/OpenColorIO/OCIOZArchive.h b/src/OpenColorIO/OCIOZArchive.h index 5bdbc6315b..cc11e19736 100644 --- a/src/OpenColorIO/OCIOZArchive.h +++ b/src/OpenColorIO/OCIOZArchive.h @@ -5,8 +5,6 @@ #ifndef INCLUDED_OCIO_ARCHIVEUTILS_H #define INCLUDED_OCIO_ARCHIVEUTILS_H -#include -#include #include #include #include diff --git a/src/OpenColorIO/Op.cpp b/src/OpenColorIO/Op.cpp index 7e95baecfc..590df998e7 100755 --- a/src/OpenColorIO/Op.cpp +++ b/src/OpenColorIO/Op.cpp @@ -1,8 +1,11 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include +#include +#include +#include #include @@ -23,6 +26,7 @@ #include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "ops/range/RangeOp.h" +#include "ops/matrix/MatrixOp.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/Op.h b/src/OpenColorIO/Op.h index 895c426d80..c78cb0f3df 100644 --- a/src/OpenColorIO/Op.h +++ b/src/OpenColorIO/Op.h @@ -5,7 +5,7 @@ #ifndef INCLUDED_OCIO_OP_H #define INCLUDED_OCIO_OP_H -#include +#include #include #include diff --git a/src/OpenColorIO/OpBuilders.h b/src/OpenColorIO/OpBuilders.h index 369c2d001b..d2143f194e 100644 --- a/src/OpenColorIO/OpBuilders.h +++ b/src/OpenColorIO/OpBuilders.h @@ -9,7 +9,6 @@ #include "Op.h" #include "LookParse.h" -#include "PrivateTypes.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/OpOptimizers.cpp b/src/OpenColorIO/OpOptimizers.cpp index 164123f413..847b9e8f81 100755 --- a/src/OpenColorIO/OpOptimizers.cpp +++ b/src/OpenColorIO/OpOptimizers.cpp @@ -2,7 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include #include @@ -13,6 +12,8 @@ #include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "ops/range/RangeOp.h" +#include "ops/matrix/MatrixOp.h" +#include "ops/matrix/MatrixOpData.h" namespace OCIO_NAMESPACE { @@ -618,10 +619,8 @@ void OpRcPtrVec::optimize(OptimizationFlags oFlags) if (IsDebugLoggingEnabled()) { std::ostringstream oss; - oss << std::endl - << "**" << std::endl - << "Optimizing Op Vec..." << std::endl - << SerializeOpVec(*this, 4) << std::endl; + oss << "\n**\nOptimizing Op Vec...\n" + << SerializeOpVec(*this, 4) << "\n"; LogDebug(oss.str()); } @@ -638,8 +637,7 @@ void OpRcPtrVec::optimize(OptimizationFlags oFlags) OpRcPtrVec::size_type finalSize = size(); std::ostringstream os; - os << "**" << std::endl; - os << "Optimized "; + os << "**\nOptimized "; os << originalSize << "->" << finalSize << ", 1 pass, "; os << total_nooptype << " no-op types removed\n"; os << SerializeOpVec(*this, 4); @@ -726,11 +724,11 @@ void OpRcPtrVec::optimize(OptimizationFlags oFlags) if (passes == MAX_OPTIMIZATION_PASSES) { std::ostringstream os; - os << "The max number of passes, " << passes << ", "; - os << "was reached during optimization. This is likely a sign "; - os << "that either the complexity of the color transform is "; - os << "very high, or that some internal optimizers are in conflict "; - os << "(undo-ing / redo-ing the other's results)."; + os << "The max number of passes, " << passes << ", " + "was reached during optimization. This is likely a sign " + "that either the complexity of the color transform is " + "very high, or that some internal optimizers are in conflict " + "(undo-ing / redo-ing the other's results)."; LogDebug(os.str()); } @@ -739,8 +737,7 @@ void OpRcPtrVec::optimize(OptimizationFlags oFlags) OpRcPtrVec::size_type finalSize = size(); std::ostringstream os; - os << "**" << std::endl; - os << "Optimized "; + os << "**\nOptimized "; os << originalSize << "->" << finalSize << ", "; os << passes << " passes, "; os << total_nooptype << " no-op types removed, "; diff --git a/src/OpenColorIO/ParseUtils.cpp b/src/OpenColorIO/ParseUtils.cpp index 47d4f2641a..ef0bff75b4 100644 --- a/src/OpenColorIO/ParseUtils.cpp +++ b/src/OpenColorIO/ParseUtils.cpp @@ -3,9 +3,13 @@ #include #include -#include +#include #include +#include #include +#include +#include +#include #include diff --git a/src/OpenColorIO/ParseUtils.h b/src/OpenColorIO/ParseUtils.h index 095e8b206f..1992191284 100644 --- a/src/OpenColorIO/ParseUtils.h +++ b/src/OpenColorIO/ParseUtils.h @@ -5,13 +5,11 @@ #define INCLUDED_OCIO_PARSEUTILS_H -#include #include #include #include -#include "PrivateTypes.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/PathUtils.cpp b/src/OpenColorIO/PathUtils.cpp index 3a68d366b4..3a5c3a322e 100644 --- a/src/OpenColorIO/PathUtils.cpp +++ b/src/OpenColorIO/PathUtils.cpp @@ -2,8 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include #include +#include #include @@ -13,9 +14,10 @@ #include "PathUtils.h" #include "Platform.h" #include "utils/StringUtils.h" -#include "OCIOZArchive.h" + #if !defined(_WIN32) +#include #include #include #else diff --git a/src/OpenColorIO/Platform.cpp b/src/OpenColorIO/Platform.cpp index 0e7fc68b2d..23e584a308 100644 --- a/src/OpenColorIO/Platform.cpp +++ b/src/OpenColorIO/Platform.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include #include #include #include -#include +#include #include diff --git a/src/OpenColorIO/Platform.h b/src/OpenColorIO/Platform.h index 67413c76f3..50652eb393 100644 --- a/src/OpenColorIO/Platform.h +++ b/src/OpenColorIO/Platform.h @@ -22,6 +22,7 @@ #include #include +#include // Missing functions on Windows. diff --git a/src/OpenColorIO/PrivateTypes.h b/src/OpenColorIO/PrivateTypes.h index 43226c4fc3..857f31d074 100644 --- a/src/OpenColorIO/PrivateTypes.h +++ b/src/OpenColorIO/PrivateTypes.h @@ -9,6 +9,7 @@ #include #include +#include #include @@ -16,15 +17,11 @@ namespace OCIO_NAMESPACE { // Stl types of OCIO classes typedef std::map StringMap; -typedef std::map StringBoolMap; typedef std::set StringSet; typedef std::vector ConstTransformVec; typedef std::vector LookVec; -typedef std::vector TransformDirectionVec; - - } // namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/Processor.cpp b/src/OpenColorIO/Processor.cpp index dab0287dfb..fe6cb9ebcc 100755 --- a/src/OpenColorIO/Processor.cpp +++ b/src/OpenColorIO/Processor.cpp @@ -1,8 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include +#include #include #include @@ -17,6 +16,8 @@ #include "Processor.h" #include "TransformBuilder.h" #include "utils/StringUtils.h" +#include "PrivateTypes.h" + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/Processor.h b/src/OpenColorIO/Processor.h index 2bbddd9f2a..2a8e4513c3 100644 --- a/src/OpenColorIO/Processor.h +++ b/src/OpenColorIO/Processor.h @@ -10,7 +10,6 @@ #include "Caching.h" #include "Mutex.h" #include "Op.h" -#include "PrivateTypes.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ScanlineHelper.cpp b/src/OpenColorIO/ScanlineHelper.cpp index 59a0020a5e..6d3d24e9c6 100644 --- a/src/OpenColorIO/ScanlineHelper.cpp +++ b/src/OpenColorIO/ScanlineHelper.cpp @@ -1,13 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include -#include "BitDepthUtils.h" #include "ScanlineHelper.h" +#include + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ScanlineHelper.h b/src/OpenColorIO/ScanlineHelper.h index f2a7a9c0f5..91d3210d49 100644 --- a/src/OpenColorIO/ScanlineHelper.h +++ b/src/OpenColorIO/ScanlineHelper.h @@ -5,6 +5,8 @@ #ifndef INCLUDED_OCIO_SCANLINEHELPER_H #define INCLUDED_OCIO_SCANLINEHELPER_H +#include + #include #include "ImagePacking.h" diff --git a/src/OpenColorIO/SystemMonitor.cpp b/src/OpenColorIO/SystemMonitor.cpp index 8ee5e915e5..ffb672fdb7 100644 --- a/src/OpenColorIO/SystemMonitor.cpp +++ b/src/OpenColorIO/SystemMonitor.cpp @@ -4,7 +4,8 @@ #include #include -#include +#include +#include #include diff --git a/src/OpenColorIO/SystemMonitor_macos.cpp b/src/OpenColorIO/SystemMonitor_macos.cpp index 4b212e6850..4b9f6032a1 100644 --- a/src/OpenColorIO/SystemMonitor_macos.cpp +++ b/src/OpenColorIO/SystemMonitor_macos.cpp @@ -8,6 +8,7 @@ #endif +#include #include #include diff --git a/src/OpenColorIO/TokensManager.h b/src/OpenColorIO/TokensManager.h index 706487289e..b698ab322d 100644 --- a/src/OpenColorIO/TokensManager.h +++ b/src/OpenColorIO/TokensManager.h @@ -5,12 +5,10 @@ #ifndef INCLUDED_OCIO_TOKENS_MANAGER_H #define INCLUDED_OCIO_TOKENS_MANAGER_H -#include -#include +#include #include -#include "PrivateTypes.h" #include "utils/StringUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/Transform.cpp b/src/OpenColorIO/Transform.cpp index 74223096fa..8266626d49 100755 --- a/src/OpenColorIO/Transform.cpp +++ b/src/OpenColorIO/Transform.cpp @@ -49,117 +49,117 @@ void BuildOps(OpRcPtrVec & ops, if(!transform) return; - if(ConstAllocationTransformRcPtr allocationTransform = \ + if(ConstAllocationTransformRcPtr allocationTransform = DynamicPtrCast(transform)) { BuildAllocationOp(ops, *allocationTransform, dir); } - else if(ConstBuiltinTransformRcPtr builtInTransform = \ + else if(ConstBuiltinTransformRcPtr builtInTransform = DynamicPtrCast(transform)) { BuildBuiltinOps(ops, *builtInTransform, dir); } - else if(ConstCDLTransformRcPtr cdlTransform = \ + else if(ConstCDLTransformRcPtr cdlTransform = DynamicPtrCast(transform)) { BuildCDLOp(ops, config, *cdlTransform, dir); } - else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = \ + else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = DynamicPtrCast(transform)) { BuildColorSpaceOps(ops, config, context, *colorSpaceTransform, dir); } - else if(ConstDisplayViewTransformRcPtr displayViewTransform = \ + else if(ConstDisplayViewTransformRcPtr displayViewTransform = DynamicPtrCast(transform)) { BuildDisplayOps(ops, config, context, *displayViewTransform, dir); } - else if(ConstExponentTransformRcPtr exponentTransform = \ + else if(ConstExponentTransformRcPtr exponentTransform = DynamicPtrCast(transform)) { BuildExponentOp(ops, config, *exponentTransform, dir); } - else if(ConstExponentWithLinearTransformRcPtr expWithLinearTransform = \ + else if(ConstExponentWithLinearTransformRcPtr expWithLinearTransform = DynamicPtrCast(transform)) { BuildExponentWithLinearOp(ops, *expWithLinearTransform, dir); } - else if (ConstExposureContrastTransformRcPtr ecTransform = \ + else if (ConstExposureContrastTransformRcPtr ecTransform = DynamicPtrCast(transform)) { BuildExposureContrastOp(ops, *ecTransform, dir); } - else if(ConstFileTransformRcPtr fileTransform = \ + else if(ConstFileTransformRcPtr fileTransform = DynamicPtrCast(transform)) { BuildFileTransformOps(ops, config, context, *fileTransform, dir); } - else if (ConstFixedFunctionTransformRcPtr fixedFunctionTransform = \ + else if (ConstFixedFunctionTransformRcPtr fixedFunctionTransform = DynamicPtrCast(transform)) { BuildFixedFunctionOp(ops, *fixedFunctionTransform, dir); } - else if (ConstGradingPrimaryTransformRcPtr gradingPrimaryTransform = \ + else if (ConstGradingPrimaryTransformRcPtr gradingPrimaryTransform = DynamicPtrCast(transform)) { BuildGradingPrimaryOp(ops, config, context, *gradingPrimaryTransform, dir); } - else if (ConstGradingRGBCurveTransformRcPtr gradingCurveTransform = \ + else if (ConstGradingRGBCurveTransformRcPtr gradingCurveTransform = DynamicPtrCast(transform)) { BuildGradingRGBCurveOp(ops, config, context, *gradingCurveTransform, dir); } - else if (ConstGradingHueCurveTransformRcPtr hueCurveTransform = \ + else if (ConstGradingHueCurveTransformRcPtr hueCurveTransform = DynamicPtrCast(transform)) { BuildGradingHueCurveOp(ops, config, context, *hueCurveTransform, dir); } - else if (ConstGradingToneTransformRcPtr gradingToneTransform = \ + else if (ConstGradingToneTransformRcPtr gradingToneTransform = DynamicPtrCast(transform)) { BuildGradingToneOp(ops, config, context, *gradingToneTransform, dir); } - else if(ConstGroupTransformRcPtr groupTransform = \ + else if(ConstGroupTransformRcPtr groupTransform = DynamicPtrCast(transform)) { BuildGroupOps(ops, config, context, *groupTransform, dir); } - else if(ConstLogAffineTransformRcPtr logAffineTransform = \ + else if(ConstLogAffineTransformRcPtr logAffineTransform = DynamicPtrCast(transform)) { BuildLogOp(ops, *logAffineTransform, dir); } - else if(ConstLogCameraTransformRcPtr logCameraTransform = \ + else if(ConstLogCameraTransformRcPtr logCameraTransform = DynamicPtrCast(transform)) { BuildLogOp(ops, *logCameraTransform, dir); } - else if(ConstLogTransformRcPtr logTransform = \ + else if(ConstLogTransformRcPtr logTransform = DynamicPtrCast(transform)) { BuildLogOp(ops, *logTransform, dir); } - else if(ConstLookTransformRcPtr lookTransform = \ + else if(ConstLookTransformRcPtr lookTransform = DynamicPtrCast(transform)) { BuildLookOps(ops, config, context, *lookTransform, dir); } - else if (ConstLut1DTransformRcPtr lut1dTransform = \ + else if (ConstLut1DTransformRcPtr lut1dTransform = DynamicPtrCast(transform)) { BuildLut1DOp(ops, *lut1dTransform, dir); } - else if (ConstLut3DTransformRcPtr lut3dTransform = \ + else if (ConstLut3DTransformRcPtr lut3dTransform = DynamicPtrCast(transform)) { BuildLut3DOp(ops, *lut3dTransform, dir); } - else if(ConstMatrixTransformRcPtr matrixTransform = \ + else if(ConstMatrixTransformRcPtr matrixTransform = DynamicPtrCast(transform)) { BuildMatrixOp(ops, *matrixTransform, dir); } - else if(ConstRangeTransformRcPtr rangeTransform = \ + else if(ConstRangeTransformRcPtr rangeTransform = DynamicPtrCast(transform)) { BuildRangeOp(ops, *rangeTransform, dir); @@ -178,117 +178,117 @@ std::ostream& operator<< (std::ostream & os, const Transform & transform) { const Transform* t = &transform; - if(const AllocationTransform * allocationTransform = \ + if(const AllocationTransform * allocationTransform = dynamic_cast(t)) { os << *allocationTransform; } - else if(const BuiltinTransform * builtInTransform = \ + else if(const BuiltinTransform * builtInTransform = dynamic_cast(t)) { os << *builtInTransform; } - else if(const CDLTransform * cdlTransform = \ + else if(const CDLTransform * cdlTransform = dynamic_cast(t)) { os << *cdlTransform; } - else if(const ColorSpaceTransform * colorSpaceTransform = \ + else if(const ColorSpaceTransform * colorSpaceTransform = dynamic_cast(t)) { os << *colorSpaceTransform; } - else if(const DisplayViewTransform * displayViewTransform = \ + else if(const DisplayViewTransform * displayViewTransform = dynamic_cast(t)) { os << *displayViewTransform; } - else if(const ExponentTransform * exponentTransform = \ + else if(const ExponentTransform * exponentTransform = dynamic_cast(t)) { os << *exponentTransform; } - else if (const ExponentWithLinearTransform * exponentLinearTransform = \ + else if (const ExponentWithLinearTransform * exponentLinearTransform = dynamic_cast(t)) { os << *exponentLinearTransform; } - else if (const ExposureContrastTransform * ecTransform = \ + else if (const ExposureContrastTransform * ecTransform = dynamic_cast(t)) { os << *ecTransform; } - else if(const FileTransform * fileTransform = \ + else if(const FileTransform * fileTransform = dynamic_cast(t)) { os << *fileTransform; } - else if(const FixedFunctionTransform * fixedFunctionTransform = \ + else if(const FixedFunctionTransform * fixedFunctionTransform = dynamic_cast(t)) { os << *fixedFunctionTransform; } - else if (const GradingPrimaryTransform * gradingPrimaryTransform = \ + else if (const GradingPrimaryTransform * gradingPrimaryTransform = dynamic_cast(t)) { os << *gradingPrimaryTransform; } - else if (const GradingRGBCurveTransform * gradingRGBCurveTransform = \ + else if (const GradingRGBCurveTransform * gradingRGBCurveTransform = dynamic_cast(t)) { os << *gradingRGBCurveTransform; } - else if (const GradingHueCurveTransform * hueCurveTransform = \ + else if (const GradingHueCurveTransform * hueCurveTransform = dynamic_cast(t)) { os << *hueCurveTransform; } - else if (const GradingToneTransform * gradingToneTransform = \ + else if (const GradingToneTransform * gradingToneTransform = dynamic_cast(t)) { os << *gradingToneTransform; } - else if(const GroupTransform * groupTransform = \ + else if(const GroupTransform * groupTransform = dynamic_cast(t)) { os << *groupTransform; } - else if (const LogAffineTransform * logAffineTransform = \ + else if (const LogAffineTransform * logAffineTransform = dynamic_cast(t)) { os << *logAffineTransform; } - else if (const LogCameraTransform * logCamTransform = \ + else if (const LogCameraTransform * logCamTransform = dynamic_cast(t)) { os << *logCamTransform; } - else if (const LogTransform * logTransform = \ + else if (const LogTransform * logTransform = dynamic_cast(t)) { os << *logTransform; } - else if(const LookTransform * lookTransform = \ + else if(const LookTransform * lookTransform = dynamic_cast(t)) { os << *lookTransform; } - else if (const Lut1DTransform * lut1dTransform = \ + else if (const Lut1DTransform * lut1dTransform = dynamic_cast(t)) { os << *lut1dTransform; } - else if (const Lut3DTransform * lut3dTransform = \ + else if (const Lut3DTransform * lut3dTransform = dynamic_cast(t)) { os << *lut3dTransform; } - else if(const MatrixTransform * matrixTransform = \ + else if(const MatrixTransform * matrixTransform = dynamic_cast(t)) { os << *matrixTransform; } - else if(const RangeTransform * rangeTransform = \ + else if(const RangeTransform * rangeTransform = dynamic_cast(t)) { os << *rangeTransform; diff --git a/src/OpenColorIO/ViewTransform.cpp b/src/OpenColorIO/ViewTransform.cpp index c14d6021ac..57cb1a7f1a 100644 --- a/src/OpenColorIO/ViewTransform.cpp +++ b/src/OpenColorIO/ViewTransform.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include diff --git a/src/OpenColorIO/ViewingRules.cpp b/src/OpenColorIO/ViewingRules.cpp index 2db7d1e499..e2a40c4e9f 100644 --- a/src/OpenColorIO/ViewingRules.cpp +++ b/src/OpenColorIO/ViewingRules.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include #include diff --git a/src/OpenColorIO/apphelpers/CategoryHelpers.cpp b/src/OpenColorIO/apphelpers/CategoryHelpers.cpp index 33aa2ade2c..6b7e57e888 100644 --- a/src/OpenColorIO/apphelpers/CategoryHelpers.cpp +++ b/src/OpenColorIO/apphelpers/CategoryHelpers.cpp @@ -3,6 +3,7 @@ #include +#include #include diff --git a/src/OpenColorIO/apphelpers/CategoryHelpers.h b/src/OpenColorIO/apphelpers/CategoryHelpers.h index 40dcbb91d2..37f7a0f571 100644 --- a/src/OpenColorIO/apphelpers/CategoryHelpers.h +++ b/src/OpenColorIO/apphelpers/CategoryHelpers.h @@ -5,7 +5,6 @@ #ifndef INCLUDED_OCIO_CATEGORY_HELPERS_H #define INCLUDED_OCIO_CATEGORY_HELPERS_H -#include #include #include diff --git a/src/OpenColorIO/apphelpers/ColorSpaceHelpers.cpp b/src/OpenColorIO/apphelpers/ColorSpaceHelpers.cpp index 7161bbc11c..f33350f05a 100644 --- a/src/OpenColorIO/apphelpers/ColorSpaceHelpers.cpp +++ b/src/OpenColorIO/apphelpers/ColorSpaceHelpers.cpp @@ -2,11 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include #include #include +#include #include -#include +#include +#include +#include +#include #include diff --git a/src/OpenColorIO/apphelpers/DisplayViewHelpers.cpp b/src/OpenColorIO/apphelpers/DisplayViewHelpers.cpp index d4055f46c1..f6bd2c3e70 100644 --- a/src/OpenColorIO/apphelpers/DisplayViewHelpers.cpp +++ b/src/OpenColorIO/apphelpers/DisplayViewHelpers.cpp @@ -2,17 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include +#include #include -#include #include #include "CategoryHelpers.h" #include "utils/StringUtils.h" -#include "LegacyViewingPipeline.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/apphelpers/LegacyViewingPipeline.cpp b/src/OpenColorIO/apphelpers/LegacyViewingPipeline.cpp index 71fe1941fd..747927daea 100644 --- a/src/OpenColorIO/apphelpers/LegacyViewingPipeline.cpp +++ b/src/OpenColorIO/apphelpers/LegacyViewingPipeline.cpp @@ -2,12 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include -#include +#include #include -#include "utils/StringUtils.h" #include "LegacyViewingPipeline.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/apphelpers/MixingHelpers.cpp b/src/OpenColorIO/apphelpers/MixingHelpers.cpp index 9f6fa1e396..297953070d 100644 --- a/src/OpenColorIO/apphelpers/MixingHelpers.cpp +++ b/src/OpenColorIO/apphelpers/MixingHelpers.cpp @@ -10,7 +10,6 @@ #include "CategoryHelpers.h" #include "ColorSpaceHelpers.h" #include "MixingHelpers.h" -#include "utils/StringUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.cpp b/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.cpp index ab74ed9975..b6ab09b3dc 100644 --- a/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.cpp +++ b/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.cpp @@ -2,19 +2,20 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include -#include +#include + +#include #include -#include +#include +#include #include #include #include "MergeConfigsHelpers.h" -#include "Logging.h" -#include "ParseUtils.h" +#include "SectionMerger.h" + #include "Platform.h" #include "OCIOMYaml.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.h b/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.h index a7d628f177..005e7bbd5f 100644 --- a/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.h +++ b/src/OpenColorIO/apphelpers/mergeconfigs/MergeConfigsHelpers.h @@ -6,14 +6,11 @@ #define INCLUDED_OCIO_MERGE_CONFIG_HELPERS_H #include -#include #include #include -#include "SectionMerger.h" #include "utils/StringUtils.h" -#include "Logging.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/apphelpers/mergeconfigs/OCIOMYaml.cpp b/src/OpenColorIO/apphelpers/mergeconfigs/OCIOMYaml.cpp index 3afddf3474..916697ffaa 100644 --- a/src/OpenColorIO/apphelpers/mergeconfigs/OCIOMYaml.cpp +++ b/src/OpenColorIO/apphelpers/mergeconfigs/OCIOMYaml.cpp @@ -3,13 +3,16 @@ #include #include +#include #include +#include +#include +#include #include #include -#include "Logging.h" #include "OCIOMYaml.h" #include "ParseUtils.h" #include "PathUtils.h" @@ -300,7 +303,7 @@ void OCIOMYaml::loadParams(const YAML::Node & node, ConfigMergingParametersRcPtr else { // Handle unsupported property or use default handler. - std::cout << "Unsupported property : " << key << std::endl; + std::cout << "Unsupported property : " << key << "\n"; } } } diff --git a/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.cpp b/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.cpp index 33c41f2931..88c4dc951d 100644 --- a/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.cpp +++ b/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.cpp @@ -1,22 +1,16 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include -#include +#include #include #include - -#include +#include #include #include "ConfigUtils.h" #include "CustomKeys.h" #include "Logging.h" -#include "OCIOMYaml.h" -#include "ParseUtils.h" #include "Platform.h" #include "SectionMerger.h" #include "TokensManager.h" @@ -1836,7 +1830,7 @@ void ViewTransformsMerger::handlePreferInput() const char * inputName = m_inputConfig->getDefaultViewTransformName(); if (!(Platform::Strcasecmp(baseName, inputName) == 0)) { - notify("The Input config contains a value that would override the Base config: "\ + notify("The Input config contains a value that would override the Base config: " "default_view_transform: " + std::string(inputName), m_params->isErrorOnConflict()); } // If the input config does not specify a default, keep the one from the base. @@ -1864,7 +1858,7 @@ void ViewTransformsMerger::handlePreferBase() const char * inputName = m_inputConfig->getDefaultViewTransformName(); if (!(Platform::Strcasecmp(baseName, inputName) == 0)) { - notify("The Input config contains a value that would override the Base config: "\ + notify("The Input config contains a value that would override the Base config: " "default_view_transform: " + std::string(inputName), m_params->isErrorOnConflict()); } // Only use the input if the base is missing. diff --git a/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.h b/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.h index 2fa6141555..2ab96fd3f3 100644 --- a/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.h +++ b/src/OpenColorIO/apphelpers/mergeconfigs/SectionMerger.h @@ -6,14 +6,14 @@ #define INCLUDED_OCIO_MERGE_CONFIG_SECTION_MERGER_H #include -#include #include +#include #include #include "ConfigUtils.h" -#include "utils/StringUtils.h" #include "Logging.h" +#include "utils/StringUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp b/src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp index bced3f4144..3b29d47039 100644 --- a/src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp +++ b/src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include #include #include diff --git a/src/OpenColorIO/fileformats/FileFormat3DL.cpp b/src/OpenColorIO/fileformats/FileFormat3DL.cpp index c4d90cc776..dd9f216dfa 100755 --- a/src/OpenColorIO/fileformats/FileFormat3DL.cpp +++ b/src/OpenColorIO/fileformats/FileFormat3DL.cpp @@ -4,13 +4,15 @@ #include #include #include +#include #include +#include +#include #include #include "BitDepthUtils.h" #include "fileformats/FileFormatUtils.h" -#include "MathUtils.h" #include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "BakingUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatCC.cpp b/src/OpenColorIO/fileformats/FileFormatCC.cpp index d8791f8196..d38e17e58d 100755 --- a/src/OpenColorIO/fileformats/FileFormatCC.cpp +++ b/src/OpenColorIO/fileformats/FileFormatCC.cpp @@ -1,15 +1,15 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include #include "fileformats/cdl/CDLParser.h" #include "fileformats/cdl/CDLWriter.h" -#include "fileformats/xmlutils/XMLReaderUtils.h" #include "fileformats/xmlutils/XMLWriterUtils.h" #include "transforms/FileTransform.h" #include "OpBuilders.h" -#include "ParseUtils.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/fileformats/FileFormatCCC.cpp b/src/OpenColorIO/fileformats/FileFormatCCC.cpp index bad7723efa..14c822a2fb 100755 --- a/src/OpenColorIO/fileformats/FileFormatCCC.cpp +++ b/src/OpenColorIO/fileformats/FileFormatCCC.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatCDL.cpp b/src/OpenColorIO/fileformats/FileFormatCDL.cpp index 5da6aae953..625c834ec0 100755 --- a/src/OpenColorIO/fileformats/FileFormatCDL.cpp +++ b/src/OpenColorIO/fileformats/FileFormatCDL.cpp @@ -27,6 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatCSP.cpp b/src/OpenColorIO/fileformats/FileFormatCSP.cpp index 418edfa570..ae99af51e7 100755 --- a/src/OpenColorIO/fileformats/FileFormatCSP.cpp +++ b/src/OpenColorIO/fileformats/FileFormatCSP.cpp @@ -3,12 +3,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -21,7 +19,6 @@ #include "BakingUtils.h" #include "ParseUtils.h" #include "transforms/FileTransform.h" -#include "Platform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatCTF.cpp b/src/OpenColorIO/fileformats/FileFormatCTF.cpp index b1f0393038..0a1fb9a4c7 100644 --- a/src/OpenColorIO/fileformats/FileFormatCTF.cpp +++ b/src/OpenColorIO/fileformats/FileFormatCTF.cpp @@ -1,10 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include +#include #include +#include +#include #include @@ -14,7 +16,6 @@ #include "fileformats/ctf/CTFTransform.h" #include "fileformats/ctf/CTFReaderHelper.h" #include "fileformats/ctf/CTFReaderUtils.h" -#include "fileformats/FileFormatUtils.h" #include "fileformats/xmlutils/XMLReaderHelper.h" #include "fileformats/xmlutils/XMLReaderUtils.h" #include "fileformats/xmlutils/XMLWriterUtils.h" @@ -23,9 +24,8 @@ #include "ops/range/RangeOp.h" #include "BakingUtils.h" #include "OpBuilders.h" -#include "ops/noop/NoOps.h" -#include "Platform.h" #include "TransformBuilder.h" +#include "Platform.h" #include "transforms/FileTransform.h" #include "utils/StringUtils.h" @@ -1584,7 +1584,7 @@ void LocalFileFormat::write(const ConstConfigRcPtr & config, CTFReaderTransformPtr transform = std::make_shared(ops, metadata); // Write XML Header. - ostream << "" << std::endl; + ostream << "\n"; XmlFormatter fmt(ostream); TransformWriter writer(fmt, transform, isCLF); diff --git a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp index 6a76d968d4..3fd10df105 100755 --- a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp +++ b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp @@ -2,11 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include #include +#include #include -#include +#include +#include #include @@ -14,10 +15,7 @@ #include "BitDepthUtils.h" #include "fileformats/FileFormatUtils.h" -#include "MathUtils.h" #include "ops/lut1d/Lut1DOp.h" -#include "ops/lut3d/Lut3DOp.h" -#include "ParseUtils.h" #include "Platform.h" #include "transforms/FileTransform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatHDL.cpp b/src/OpenColorIO/fileformats/FileFormatHDL.cpp index 16e0ffab53..666cdc8824 100755 --- a/src/OpenColorIO/fileformats/FileFormatHDL.cpp +++ b/src/OpenColorIO/fileformats/FileFormatHDL.cpp @@ -18,19 +18,16 @@ */ -#include -#include -#include #include -#include #include #include #include +#include +#include #include #include "fileformats/FileFormatUtils.h" -#include "MathUtils.h" #include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "ops/matrix/MatrixOp.h" diff --git a/src/OpenColorIO/fileformats/FileFormatICC.cpp b/src/OpenColorIO/fileformats/FileFormatICC.cpp index 69c0145d8a..bf65b94222 100755 --- a/src/OpenColorIO/fileformats/FileFormatICC.cpp +++ b/src/OpenColorIO/fileformats/FileFormatICC.cpp @@ -4,6 +4,7 @@ #include #include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatIridasCube.cpp b/src/OpenColorIO/fileformats/FileFormatIridasCube.cpp index ca2965e373..ac1832c2f4 100755 --- a/src/OpenColorIO/fileformats/FileFormatIridasCube.cpp +++ b/src/OpenColorIO/fileformats/FileFormatIridasCube.cpp @@ -2,9 +2,10 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include -#include +#include +#include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatIridasItx.cpp b/src/OpenColorIO/fileformats/FileFormatIridasItx.cpp index ae6282efb8..86e1d9161c 100755 --- a/src/OpenColorIO/fileformats/FileFormatIridasItx.cpp +++ b/src/OpenColorIO/fileformats/FileFormatIridasItx.cpp @@ -1,15 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include + #include +#include #include #include "fileformats/FileFormatUtils.h" -#include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "BakingUtils.h" #include "ParseUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp index 0ba209a905..213d0ea88f 100755 --- a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp +++ b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp @@ -3,7 +3,8 @@ #include #include -#include +#include +#include #include @@ -11,9 +12,7 @@ #include "expat.h" #include "fileformats/FileFormatUtils.h" -#include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" -#include "ParseUtils.h" #include "Platform.h" #include "transforms/FileTransform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatPandora.cpp b/src/OpenColorIO/fileformats/FileFormatPandora.cpp index 6d36321527..4973996c69 100755 --- a/src/OpenColorIO/fileformats/FileFormatPandora.cpp +++ b/src/OpenColorIO/fileformats/FileFormatPandora.cpp @@ -2,14 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include +#include +#include #include #include "BitDepthUtils.h" #include "fileformats/FileFormatUtils.h" -#include "ops/lut1d/Lut1DOp.h" #include "ops/lut3d/Lut3DOp.h" #include "ParseUtils.h" #include "transforms/FileTransform.h" diff --git a/src/OpenColorIO/fileformats/FileFormatResolveCube.cpp b/src/OpenColorIO/fileformats/FileFormatResolveCube.cpp index 6b5e0da8d7..0fb79fe72d 100755 --- a/src/OpenColorIO/fileformats/FileFormatResolveCube.cpp +++ b/src/OpenColorIO/fileformats/FileFormatResolveCube.cpp @@ -2,9 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include -#include +#include #include @@ -14,8 +12,6 @@ #include "ops/matrix/MatrixOp.h" #include "BakingUtils.h" #include "ParseUtils.h" -#include "MathUtils.h" -#include "Logging.h" #include "transforms/FileTransform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatSpi1D.cpp b/src/OpenColorIO/fileformats/FileFormatSpi1D.cpp index 1cdc51b22c..3e5e33577b 100755 --- a/src/OpenColorIO/fileformats/FileFormatSpi1D.cpp +++ b/src/OpenColorIO/fileformats/FileFormatSpi1D.cpp @@ -3,8 +3,8 @@ #include #include -#include #include +#include #include @@ -12,7 +12,6 @@ #include "ops/lut1d/Lut1DOp.h" #include "ops/matrix/MatrixOp.h" #include "BakingUtils.h" -#include "ParseUtils.h" #include "Platform.h" #include "transforms/FileTransform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatSpi3D.cpp b/src/OpenColorIO/fileformats/FileFormatSpi3D.cpp index c3ef153f43..33f20069f3 100755 --- a/src/OpenColorIO/fileformats/FileFormatSpi3D.cpp +++ b/src/OpenColorIO/fileformats/FileFormatSpi3D.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatSpiMtx.cpp b/src/OpenColorIO/fileformats/FileFormatSpiMtx.cpp index 663a4e9a5d..e7713e2514 100755 --- a/src/OpenColorIO/fileformats/FileFormatSpiMtx.cpp +++ b/src/OpenColorIO/fileformats/FileFormatSpiMtx.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include diff --git a/src/OpenColorIO/fileformats/FileFormatTruelight.cpp b/src/OpenColorIO/fileformats/FileFormatTruelight.cpp index 0d95261cc3..20e8fb3dca 100755 --- a/src/OpenColorIO/fileformats/FileFormatTruelight.cpp +++ b/src/OpenColorIO/fileformats/FileFormatTruelight.cpp @@ -2,10 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include #include -#include +#include +#include +#include +#include #include diff --git a/src/OpenColorIO/fileformats/FileFormatUtils.cpp b/src/OpenColorIO/fileformats/FileFormatUtils.cpp index 1e1906ba9a..d0f94be790 100644 --- a/src/OpenColorIO/fileformats/FileFormatUtils.cpp +++ b/src/OpenColorIO/fileformats/FileFormatUtils.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include "fileformats/FileFormatUtils.h" diff --git a/src/OpenColorIO/fileformats/FileFormatVF.cpp b/src/OpenColorIO/fileformats/FileFormatVF.cpp index 9026030344..c5b4220ace 100755 --- a/src/OpenColorIO/fileformats/FileFormatVF.cpp +++ b/src/OpenColorIO/fileformats/FileFormatVF.cpp @@ -1,10 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include -#include +#include +#include #include diff --git a/src/OpenColorIO/fileformats/FormatMetadata.cpp b/src/OpenColorIO/fileformats/FormatMetadata.cpp index 8b5fe1cfad..eb89ec399c 100644 --- a/src/OpenColorIO/fileformats/FormatMetadata.cpp +++ b/src/OpenColorIO/fileformats/FormatMetadata.cpp @@ -2,7 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include diff --git a/src/OpenColorIO/fileformats/FormatMetadata.h b/src/OpenColorIO/fileformats/FormatMetadata.h index 35c8cb2e01..691c215ea9 100644 --- a/src/OpenColorIO/fileformats/FormatMetadata.h +++ b/src/OpenColorIO/fileformats/FormatMetadata.h @@ -4,13 +4,12 @@ #ifndef INCLUDED_OCIO_OPS_METADATA_H #define INCLUDED_OCIO_OPS_METADATA_H -#include +#include #include #include #include -#include "PrivateTypes.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/fileformats/cdl/CDLParser.cpp b/src/OpenColorIO/fileformats/cdl/CDLParser.cpp index 1c02d7670e..dc4cd25da5 100644 --- a/src/OpenColorIO/fileformats/cdl/CDLParser.cpp +++ b/src/OpenColorIO/fileformats/cdl/CDLParser.cpp @@ -2,6 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include +#include #include "expat.h" #include "fileformats/cdl/CDLParser.h" @@ -9,7 +12,6 @@ #include "fileformats/xmlutils/XMLReaderHelper.h" #include "fileformats/xmlutils/XMLReaderUtils.h" #include "transforms/CDLTransform.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/fileformats/cdl/CDLReaderHelper.cpp b/src/OpenColorIO/fileformats/cdl/CDLReaderHelper.cpp index 38eaab76dd..27a3e5064a 100644 --- a/src/OpenColorIO/fileformats/cdl/CDLReaderHelper.cpp +++ b/src/OpenColorIO/fileformats/cdl/CDLReaderHelper.cpp @@ -1,6 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include + #include "fileformats/cdl/CDLReaderHelper.h" #include "fileformats/xmlutils/XMLReaderUtils.h" diff --git a/src/OpenColorIO/fileformats/cdl/CDLWriter.cpp b/src/OpenColorIO/fileformats/cdl/CDLWriter.cpp index 809785ec98..6aee8d323c 100644 --- a/src/OpenColorIO/fileformats/cdl/CDLWriter.cpp +++ b/src/OpenColorIO/fileformats/cdl/CDLWriter.cpp @@ -1,14 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include "fileformats/cdl/CDLWriter.h" #include "fileformats/xmlutils/XMLReaderUtils.h" #include "fileformats/xmlutils/XMLWriterUtils.h" #include "ParseUtils.h" #include "transforms/CDLTransform.h" -#include "transforms/FileTransform.h" +#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.cpp b/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.cpp index 79393fc489..5e47f800e5 100644 --- a/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.cpp +++ b/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.cpp @@ -1,6 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include + #include "BitDepthUtils.h" #include "fileformats/ctf/CTFReaderHelper.h" #include "fileformats/ctf/CTFReaderUtils.h" @@ -8,7 +14,6 @@ #include "Logging.h" #include "MathUtils.h" #include "ops/log/LogUtils.h" -#include "ParseUtils.h" #include "Platform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.h b/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.h index e4e1bacecd..7f3e7dbc46 100644 --- a/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.h +++ b/src/OpenColorIO/fileformats/ctf/CTFReaderHelper.h @@ -4,6 +4,11 @@ #ifndef INCLUDED_OCIO_FILEFORMATS_CTF_CTFREADERHELPER_H #define INCLUDED_OCIO_FILEFORMATS_CTF_CTFREADERHELPER_H +#include +#include + +#include + #include "fileformats/xmlutils/XMLReaderHelper.h" #include "fileformats/ctf/CTFTransform.h" #include "fileformats/ctf/IndexMapping.h" diff --git a/src/OpenColorIO/fileformats/ctf/CTFReaderUtils.cpp b/src/OpenColorIO/fileformats/ctf/CTFReaderUtils.cpp index ffd73cbd43..b870065dea 100644 --- a/src/OpenColorIO/fileformats/ctf/CTFReaderUtils.cpp +++ b/src/OpenColorIO/fileformats/ctf/CTFReaderUtils.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include "fileformats/ctf/CTFReaderUtils.h" diff --git a/src/OpenColorIO/fileformats/ctf/CTFTransform.cpp b/src/OpenColorIO/fileformats/ctf/CTFTransform.cpp index 5a21b6cb1d..87f287d408 100644 --- a/src/OpenColorIO/fileformats/ctf/CTFTransform.cpp +++ b/src/OpenColorIO/fileformats/ctf/CTFTransform.cpp @@ -1,7 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include +#include +#include +#include +#include +#include +#include #include "BitDepthUtils.h" #include "fileformats/ctf/CTFReaderUtils.h" @@ -25,8 +32,6 @@ #include "ops/lut3d/Lut3DOpData.h" #include "ops/matrix/MatrixOpData.h" #include "ops/range/RangeOpData.h" -#include "ops/reference/ReferenceOpData.h" -#include "ParseUtils.h" #include "Platform.h" #include "transforms/CDLTransform.h" diff --git a/src/OpenColorIO/fileformats/ctf/CTFTransform.h b/src/OpenColorIO/fileformats/ctf/CTFTransform.h index f8fb741c26..755b0543d6 100644 --- a/src/OpenColorIO/fileformats/ctf/CTFTransform.h +++ b/src/OpenColorIO/fileformats/ctf/CTFTransform.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_FILEFORMATS_CTF_CTFTRANSFORM_H -#include - #include #include "fileformats/FormatMetadata.h" diff --git a/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.cpp b/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.cpp index d5b5be5dcf..b1116a632a 100644 --- a/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.cpp +++ b/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.cpp @@ -2,12 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include "fileformats/xmlutils/XMLReaderHelper.h" #include "fileformats/xmlutils/XMLReaderUtils.h" #include "Logging.h" -#include "ParseUtils.h" -#include "Platform.h" + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.h b/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.h index 203d3bcdfc..fcdd468215 100644 --- a/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.h +++ b/src/OpenColorIO/fileformats/xmlutils/XMLReaderHelper.h @@ -5,13 +5,14 @@ #define INCLUDED_OCIO_FILEFORMATS_XMLUTILS_XMLREADERHELPER_H -#include +#include +#include +#include #include #include "fileformats/xmlutils/XMLReaderUtils.h" #include "ops/cdl/CDLOpData.h" -#include "PrivateTypes.h" #include "transforms/CDLTransform.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/fileformats/xmlutils/XMLReaderUtils.h b/src/OpenColorIO/fileformats/xmlutils/XMLReaderUtils.h index 9a813a2551..9cdaacb94a 100644 --- a/src/OpenColorIO/fileformats/xmlutils/XMLReaderUtils.h +++ b/src/OpenColorIO/fileformats/xmlutils/XMLReaderUtils.h @@ -9,13 +9,11 @@ #include #include #include +#include #include -#include "MathUtils.h" -#include "utils/StringUtils.h" #include "utils/NumberUtils.h" -#include "Platform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.cpp b/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.cpp index 30fa0a8266..67f194b128 100644 --- a/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.cpp +++ b/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.cpp @@ -1,6 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include #include "fileformats/xmlutils/XMLWriterUtils.h" diff --git a/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.h b/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.h index c5ea120891..c07a5489a8 100644 --- a/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.h +++ b/src/OpenColorIO/fileformats/xmlutils/XMLWriterUtils.h @@ -6,6 +6,8 @@ #include #include +#include +#include #include diff --git a/src/OpenColorIO/ops/OpTools.cpp b/src/OpenColorIO/ops/OpTools.cpp index 57833a1cea..2155ed2a98 100644 --- a/src/OpenColorIO/ops/OpTools.cpp +++ b/src/OpenColorIO/ops/OpTools.cpp @@ -1,9 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include -#include "BitDepthUtils.h" #include "ops/OpTools.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/OpTools.h b/src/OpenColorIO/ops/OpTools.h index e103dab394..a9bc4a89cb 100644 --- a/src/OpenColorIO/ops/OpTools.h +++ b/src/OpenColorIO/ops/OpTools.h @@ -8,7 +8,6 @@ #include #include "Op.h" -#include "PrivateTypes.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/allocation/AllocationOp.cpp b/src/OpenColorIO/ops/allocation/AllocationOp.cpp index e8141e38fb..e480b6368a 100644 --- a/src/OpenColorIO/ops/allocation/AllocationOp.cpp +++ b/src/OpenColorIO/ops/allocation/AllocationOp.cpp @@ -1,7 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include diff --git a/src/OpenColorIO/ops/allocation/AllocationOp.h b/src/OpenColorIO/ops/allocation/AllocationOp.h index edc3303d6c..26b2a0dcfd 100644 --- a/src/OpenColorIO/ops/allocation/AllocationOp.h +++ b/src/OpenColorIO/ops/allocation/AllocationOp.h @@ -5,6 +5,10 @@ #ifndef INCLUDED_OCIO_ALLOCATIONOP_H #define INCLUDED_OCIO_ALLOCATIONOP_H +#include +#include +#include + #include #include "Op.h" diff --git a/src/OpenColorIO/ops/cdl/CDLOp.cpp b/src/OpenColorIO/ops/cdl/CDLOp.cpp index bd0511ea43..a0f0bd391d 100644 --- a/src/OpenColorIO/ops/cdl/CDLOp.cpp +++ b/src/OpenColorIO/ops/cdl/CDLOp.cpp @@ -1,15 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "BitDepthUtils.h" -#include "GpuShaderUtils.h" -#include "HashUtils.h" -#include "MathUtils.h" #include "ops/cdl/CDLOp.h" #include "ops/cdl/CDLOpCPU.h" #include "ops/cdl/CDLOpGPU.h" diff --git a/src/OpenColorIO/ops/cdl/CDLOp.h b/src/OpenColorIO/ops/cdl/CDLOp.h index 29681c3cee..50213c4fb4 100644 --- a/src/OpenColorIO/ops/cdl/CDLOp.h +++ b/src/OpenColorIO/ops/cdl/CDLOp.h @@ -5,8 +5,6 @@ #ifndef INCLUDED_OCIO_CDL_H #define INCLUDED_OCIO_CDL_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/cdl/CDLOpCPU.cpp b/src/OpenColorIO/ops/cdl/CDLOpCPU.cpp index 982e992f14..1f9344011c 100644 --- a/src/OpenColorIO/ops/cdl/CDLOpCPU.cpp +++ b/src/OpenColorIO/ops/cdl/CDLOpCPU.cpp @@ -3,11 +3,10 @@ #include #include -#include +#include #include -#include "BitDepthUtils.h" #include "CDLOpCPU.h" #include "SSE.h" diff --git a/src/OpenColorIO/ops/cdl/CDLOpData.cpp b/src/OpenColorIO/ops/cdl/CDLOpData.cpp index fa214be887..82aa5b5ee5 100644 --- a/src/OpenColorIO/ops/cdl/CDLOpData.cpp +++ b/src/OpenColorIO/ops/cdl/CDLOpData.cpp @@ -1,11 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include +#include +#include #include -#include "BitDepthUtils.h" #include "ops/cdl/CDLOpData.h" #include "ops/matrix/MatrixOpData.h" #include "ops/range/RangeOpData.h" diff --git a/src/OpenColorIO/ops/exponent/ExponentOp.cpp b/src/OpenColorIO/ops/exponent/ExponentOp.cpp index 41b95992c4..c4921351cc 100644 --- a/src/OpenColorIO/ops/exponent/ExponentOp.cpp +++ b/src/OpenColorIO/ops/exponent/ExponentOp.cpp @@ -8,7 +8,6 @@ #include -#include "HashUtils.h" #include "ops/exponent/ExponentOp.h" #include "GpuShaderUtils.h" #include "MathUtils.h" diff --git a/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpCPU.cpp b/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpCPU.cpp index 6a3e7383a5..1fa3e2d6f1 100644 --- a/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpCPU.cpp +++ b/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpCPU.cpp @@ -6,7 +6,6 @@ #include -#include "BitDepthUtils.h" #include "DynamicProperty.h" #include "ops/exposurecontrast/ExposureContrastOpCPU.h" #include "SSE.h" diff --git a/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpGPU.cpp b/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpGPU.cpp index 97dd56faf3..4ba4e3dadb 100644 --- a/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpGPU.cpp +++ b/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpGPU.cpp @@ -8,7 +8,6 @@ #include "Logging.h" #include "ops/exposurecontrast/ExposureContrastOpGPU.h" -#include "utils/StringUtils.h" namespace OCIO_NAMESPACE @@ -66,7 +65,7 @@ std::string AddProperty(GpuShaderCreatorRcPtr & shaderCreator, if (shaderCreator->getLanguage() == LANGUAGE_OSL_1 && prop->isDynamic()) { - std::string msg("The dynamic properties are not yet supported by the 'Open Shading language"\ + std::string msg("The dynamic properties are not yet supported by the 'Open Shading language" " (OSL)' translation: The '"); msg += name; msg += "' dynamic property is replaced by a local variable."; diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp index 4f9569ef1c..a0a799f448 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "GpuShaderUtils.h" #include "ops/fixedfunction/FixedFunctionOpCPU.h" #include "ops/fixedfunction/FixedFunctionOpGPU.h" #include "ops/fixedfunction/FixedFunctionOp.h" diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.h b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.h index 659f926d61..d643f24453 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.h +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_FIXEDFUNCTION_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.cpp b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.cpp index ed7fcb362e..629d3ce3fd 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.cpp +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.h b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.h index f2946eda42..6264b95f1e 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.h +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.h @@ -4,8 +4,6 @@ #ifndef INCLUDED_OCIO_FIXEDFUNCTION_CPU_H #define INCLUDED_OCIO_FIXEDFUNCTION_CPU_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpData.h b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpData.h index c7c92589d0..9ff401d23d 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpData.h +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpData.h @@ -6,6 +6,9 @@ #define INCLUDED_OCIO_FIXEDFUNCTIONOPDATA_H +#include +#include + #include #include "Op.h" diff --git a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp index 6f3070d557..8699c7c1d6 100644 --- a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp +++ b/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include diff --git a/src/OpenColorIO/ops/gamma/GammaOp.cpp b/src/OpenColorIO/ops/gamma/GammaOp.cpp index 9d6afccc7d..aaf16219eb 100644 --- a/src/OpenColorIO/ops/gamma/GammaOp.cpp +++ b/src/OpenColorIO/ops/gamma/GammaOp.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include #include "GpuShaderUtils.h" diff --git a/src/OpenColorIO/ops/gamma/GammaOp.h b/src/OpenColorIO/ops/gamma/GammaOp.h index d38a46e6ac..5b393fd4db 100644 --- a/src/OpenColorIO/ops/gamma/GammaOp.h +++ b/src/OpenColorIO/ops/gamma/GammaOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_GAMMA_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gamma/GammaOpCPU.cpp b/src/OpenColorIO/ops/gamma/GammaOpCPU.cpp index ace0006ca8..089e0aba13 100644 --- a/src/OpenColorIO/ops/gamma/GammaOpCPU.cpp +++ b/src/OpenColorIO/ops/gamma/GammaOpCPU.cpp @@ -3,15 +3,18 @@ #include #include +#include #include -#include "BitDepthUtils.h" #include "ops/gamma/GammaOpCPU.h" #include "ops/gamma/GammaOpUtils.h" #include "SSE.h" +#if OCIO_USE_SSE2 == 0 +#include +#endif namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gamma/GammaOpData.cpp b/src/OpenColorIO/ops/gamma/GammaOpData.cpp index baf0bc7288..6c06389afe 100644 --- a/src/OpenColorIO/ops/gamma/GammaOpData.cpp +++ b/src/OpenColorIO/ops/gamma/GammaOpData.cpp @@ -6,11 +6,8 @@ #include -#include "BitDepthUtils.h" #include "ops/gamma/GammaOpData.h" -#include "ops/matrix/MatrixOp.h" #include "ops/range/RangeOpData.h" -#include "ParseUtils.h" #include "Platform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/gamma/GammaOpData.h b/src/OpenColorIO/ops/gamma/GammaOpData.h index 086e8f55b9..fa9567b54d 100644 --- a/src/OpenColorIO/ops/gamma/GammaOpData.h +++ b/src/OpenColorIO/ops/gamma/GammaOpData.h @@ -6,6 +6,9 @@ #define INCLUDED_OCIO_GAMMAOPDATA_H +#include +#include + #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gamma/GammaOpUtils.cpp b/src/OpenColorIO/ops/gamma/GammaOpUtils.cpp index 8a158fa886..c745948a0a 100644 --- a/src/OpenColorIO/ops/gamma/GammaOpUtils.cpp +++ b/src/OpenColorIO/ops/gamma/GammaOpUtils.cpp @@ -2,11 +2,10 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include +#include #include -#include "BitDepthUtils.h" #include "ops/gamma/GammaOpUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurve.cpp b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurve.cpp index 84e9a71773..ad8263e40c 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurve.cpp +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurve.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.cpp b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.cpp index 1915301319..64b13b05d3 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.cpp +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "GpuShaderUtils.h" #include "ops/gradinghuecurve/GradingHueCurveOpCPU.h" #include "ops/gradinghuecurve/GradingHueCurveOpGPU.h" #include "ops/gradinghuecurve/GradingHueCurveOp.h" diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.h b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.h index 02181e0b54..ea49f0eb77 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.h +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_HUECURVE_OP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.cpp b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.cpp index c3728eb882..44b0a970b7 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.cpp +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.cpp @@ -7,8 +7,6 @@ #include -#include "BitDepthUtils.h" -#include "MathUtils.h" #include "ops/gradinghuecurve/GradingHueCurveOpCPU.h" #include "ops/fixedfunction/FixedFunctionOpCPU.h" #include "ops/fixedfunction/FixedFunctionOpData.h" diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.h b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.h index 934e84ce0f..350242dc9b 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.h +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpCPU.h @@ -4,8 +4,6 @@ #ifndef INCLUDED_OCIO_GRADINGHUECURVE_CPU_H #define INCLUDED_OCIO_GRADINGHUECURVE_CPU_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpData.cpp b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpData.cpp index 8d19439b2f..a59ec75bcc 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpData.cpp +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpData.cpp @@ -5,9 +5,7 @@ #include -#include "ops/gradinghuecurve/GradingHueCurve.h" #include "ops/gradinghuecurve/GradingHueCurveOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpGPU.cpp b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpGPU.cpp index 4050c11fc9..9f60a8825b 100644 --- a/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpGPU.cpp +++ b/src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOpGPU.cpp @@ -613,7 +613,7 @@ void GetGradingHueCurveGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator, if (gcData->isDynamic() && shaderCreator->getLanguage() == LANGUAGE_OSL_1) { - std::string msg("The dynamic properties are not yet supported by the 'Open Shading language"\ + std::string msg("The dynamic properties are not yet supported by the 'Open Shading language" " (OSL)' translation: The '"); msg += opPrefix; msg += "' dynamic property is replaced by a local variable."; diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimary.cpp b/src/OpenColorIO/ops/gradingprimary/GradingPrimary.cpp index 788640b7f7..f04ae697b8 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimary.cpp +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimary.cpp @@ -4,6 +4,7 @@ #include #include +#include #include diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.cpp b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.cpp index 5bb2f960bf..cc61a14a32 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.cpp +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "GpuShaderUtils.h" #include "ops/gradingprimary/GradingPrimaryOpCPU.h" #include "ops/gradingprimary/GradingPrimaryOpGPU.h" #include "ops/gradingprimary/GradingPrimaryOp.h" diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.h b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.h index fc109559ed..25befd1663 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.h +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_GRADINGPRIMARY_OP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.cpp b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.cpp index f0e73d648f..a89cf02895 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.cpp +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.cpp @@ -1,17 +1,19 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include #include +#include #include -#include "BitDepthUtils.h" -#include "MathUtils.h" #include "ops/gradingprimary/GradingPrimaryOpCPU.h" #include "SSE.h" +#if OCIO_USE_SSE2 == 0 +#include +#include +#endif + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.h b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.h index f05bb41d57..9faa51afd2 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.h +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpCPU.h @@ -4,8 +4,6 @@ #ifndef INCLUDED_OCIO_GRADINGPRIMARY_CPU_H #define INCLUDED_OCIO_GRADINGPRIMARY_CPU_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpData.cpp b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpData.cpp index d6612195de..a2e08a943e 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpData.cpp +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpData.cpp @@ -7,7 +7,6 @@ #include "ops/gradingprimary/GradingPrimaryOpData.h" #include "ops/range/RangeOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpGPU.cpp b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpGPU.cpp index a0d2298f0c..06e95ea375 100644 --- a/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpGPU.cpp +++ b/src/OpenColorIO/ops/gradingprimary/GradingPrimaryOpGPU.cpp @@ -520,7 +520,7 @@ void GetGradingPrimaryGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator, if (gpData->isDynamic() && shaderCreator->getLanguage() == LANGUAGE_OSL_1) { - std::string msg("The dynamic properties are not yet supported by the 'Open Shading language"\ + std::string msg("The dynamic properties are not yet supported by the 'Open Shading language" " (OSL)' translation: The '"); msg += opPrefix; msg += "' dynamic property is replaced by a local variable."; diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.cpp index 8dc8d8d23d..1658e23db6 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.cpp @@ -2,8 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include #include +#include +#include +#include +#include #include #include "OpenColorIO/DynamicProperty.h" diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.h b/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.h index f990f67886..6ba4dd4e04 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.h +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingBSplineCurve.h @@ -5,8 +5,8 @@ #ifndef INCLUDED_OCIO_GRADINGBSPLINECURVE_H #define INCLUDED_OCIO_GRADINGBSPLINECURVE_H -#include #include +#include #include diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurve.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurve.cpp index d223c5315b..53efa176a5 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurve.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurve.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.cpp index 598ae28e67..503d3ff57f 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "GpuShaderUtils.h" #include "ops/gradingrgbcurve/GradingRGBCurveOpCPU.h" #include "ops/gradingrgbcurve/GradingRGBCurveOpGPU.h" #include "ops/gradingrgbcurve/GradingRGBCurveOp.h" diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.h b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.h index 21e5c310a4..72c06919eb 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.h +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_GRADINGRGBCURVE_OP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp index 914a9881a0..71d7213af1 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp @@ -1,14 +1,15 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include #include +#include + +#if OCIO_USE_SSE2 == 0 +#include +#endif #include -#include "BitDepthUtils.h" -#include "MathUtils.h" #include "ops/gradingrgbcurve/GradingRGBCurveOpCPU.h" #include "SSE.h" diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.h b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.h index 76d2fae548..4f0b427ef6 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.h +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpCPU.h @@ -4,8 +4,6 @@ #ifndef INCLUDED_OCIO_GRADINGRGBCURVE_CPU_H #define INCLUDED_OCIO_GRADINGRGBCURVE_CPU_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpData.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpData.cpp index d838811bad..7aee63fc9b 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpData.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpData.cpp @@ -7,8 +7,7 @@ #include "ops/gradingrgbcurve/GradingRGBCurve.h" #include "ops/gradingrgbcurve/GradingRGBCurveOpData.h" -#include "ops/range/RangeOpData.h" -#include "Platform.h" + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp index e2ae5d7b86..6cfd34299c 100644 --- a/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp +++ b/src/OpenColorIO/ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp @@ -370,7 +370,7 @@ void GetGradingRGBCurveGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator, if (gcData->isDynamic() && shaderCreator->getLanguage() == LANGUAGE_OSL_1) { - std::string msg("The dynamic properties are not yet supported by the 'Open Shading language"\ + std::string msg("The dynamic properties are not yet supported by the 'Open Shading language" " (OSL)' translation: The '"); msg += opPrefix; msg += "' dynamic property is replaced by a local variable."; diff --git a/src/OpenColorIO/ops/gradingtone/GradingTone.cpp b/src/OpenColorIO/ops/gradingtone/GradingTone.cpp index 932b0a6d14..065e1fc81f 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingTone.cpp +++ b/src/OpenColorIO/ops/gradingtone/GradingTone.cpp @@ -3,6 +3,7 @@ #include +#include #include diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOp.cpp b/src/OpenColorIO/ops/gradingtone/GradingToneOp.cpp index 5968210e71..edc6d6cbab 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOp.cpp +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOp.cpp @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "GpuShaderUtils.h" #include "ops/gradingtone/GradingToneOpCPU.h" #include "ops/gradingtone/GradingToneOpGPU.h" #include "ops/gradingtone/GradingToneOp.h" diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOp.h b/src/OpenColorIO/ops/gradingtone/GradingToneOp.h index 9ee78f2395..a9a70df0e1 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOp.h +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_GRADINGTONE_OP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.cpp b/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.cpp index 83949d8767..f07519991a 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.cpp +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.cpp @@ -7,7 +7,6 @@ #include -#include "BitDepthUtils.h" #include "MathUtils.h" #include "ops/gradingtone/GradingToneOpCPU.h" #include "SSE.h" diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.h b/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.h index 127ab5b23d..de744cf243 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.h +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOpCPU.h @@ -4,8 +4,6 @@ #ifndef INCLUDED_OCIO_GRADINGTONE_CPU_H #define INCLUDED_OCIO_GRADINGTONE_CPU_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOpData.cpp b/src/OpenColorIO/ops/gradingtone/GradingToneOpData.cpp index 67e184cd39..e1b5a8a034 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOpData.cpp +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOpData.cpp @@ -5,10 +5,8 @@ #include -#include "MathUtils.h" #include "ops/gradingtone/GradingTone.h" #include "ops/gradingtone/GradingToneOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/gradingtone/GradingToneOpGPU.cpp b/src/OpenColorIO/ops/gradingtone/GradingToneOpGPU.cpp index 9dfa1543ea..72444f8864 100644 --- a/src/OpenColorIO/ops/gradingtone/GradingToneOpGPU.cpp +++ b/src/OpenColorIO/ops/gradingtone/GradingToneOpGPU.cpp @@ -6,7 +6,6 @@ #include "Logging.h" #include "ops/gradingtone/GradingToneOpGPU.h" -#include "utils/StringUtils.h" namespace OCIO_NAMESPACE @@ -1540,7 +1539,7 @@ void GetGradingToneGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator, if (gtData->isDynamic() && shaderCreator->getLanguage() == LANGUAGE_OSL_1) { - std::string msg("The dynamic properties are not yet supported by the 'Open Shading language"\ + std::string msg("The dynamic properties are not yet supported by the 'Open Shading language" " (OSL)' translation: The '"); msg += opPrefix; msg += "' dynamic property is replaced by a local variable."; diff --git a/src/OpenColorIO/ops/log/LogOp.cpp b/src/OpenColorIO/ops/log/LogOp.cpp index 8eeff9b3b2..834a0e6084 100644 --- a/src/OpenColorIO/ops/log/LogOp.cpp +++ b/src/OpenColorIO/ops/log/LogOp.cpp @@ -1,16 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include -#include +#include #include -#include "HashUtils.h" -#include "GpuShaderUtils.h" -#include "MathUtils.h" #include "ops/log/LogOpCPU.h" #include "ops/log/LogOpData.h" #include "ops/log/LogOpGPU.h" diff --git a/src/OpenColorIO/ops/log/LogOp.h b/src/OpenColorIO/ops/log/LogOp.h index 9f65419753..abd4851edb 100644 --- a/src/OpenColorIO/ops/log/LogOp.h +++ b/src/OpenColorIO/ops/log/LogOp.h @@ -5,8 +5,6 @@ #ifndef INCLUDED_OCIO_LOGOPS_H #define INCLUDED_OCIO_LOGOPS_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/log/LogOpCPU.cpp b/src/OpenColorIO/ops/log/LogOpCPU.cpp index bed3c9d5a1..ca78bd6e57 100644 --- a/src/OpenColorIO/ops/log/LogOpCPU.cpp +++ b/src/OpenColorIO/ops/log/LogOpCPU.cpp @@ -4,18 +4,16 @@ #include #include #include +#include +#include #if OCIO_USE_SSE2 == 0 #include #endif #include -#include "BitDepthUtils.h" -#include "MathUtils.h" #include "ops/log/LogOpCPU.h" #include "ops/log/LogUtils.h" -#include "ops/OpTools.h" -#include "Platform.h" #include "SSE.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/log/LogOpData.cpp b/src/OpenColorIO/ops/log/LogOpData.cpp index ec0589479b..cf747dbdcb 100644 --- a/src/OpenColorIO/ops/log/LogOpData.cpp +++ b/src/OpenColorIO/ops/log/LogOpData.cpp @@ -1,18 +1,17 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include #include -#include "BitDepthUtils.h" #include "MathUtils.h" #include "ops/log/LogOpData.h" -#include "ops/log/LogUtils.h" #include "ops/matrix/MatrixOpData.h" #include "ops/range/RangeOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/log/LogOpData.h b/src/OpenColorIO/ops/log/LogOpData.h index 3c8ddc3e2b..cf395cb88a 100644 --- a/src/OpenColorIO/ops/log/LogOpData.h +++ b/src/OpenColorIO/ops/log/LogOpData.h @@ -5,6 +5,10 @@ #ifndef INCLUDED_OCIO_OPS_LOG_LOGOPDATA_H #define INCLUDED_OCIO_OPS_LOG_LOGOPDATA_H +#include +#include +#include + #include #include "Op.h" diff --git a/src/OpenColorIO/ops/log/LogOpGPU.cpp b/src/OpenColorIO/ops/log/LogOpGPU.cpp index 6ea9756a68..3f94e3d74c 100644 --- a/src/OpenColorIO/ops/log/LogOpGPU.cpp +++ b/src/OpenColorIO/ops/log/LogOpGPU.cpp @@ -1,12 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include #include "GpuShaderUtils.h" -#include "MathUtils.h" #include "ops/log/LogOpGPU.h" #include "ops/log/LogUtils.h" diff --git a/src/OpenColorIO/ops/log/LogUtils.cpp b/src/OpenColorIO/ops/log/LogUtils.cpp index 77548acfe6..e023337774 100644 --- a/src/OpenColorIO/ops/log/LogUtils.cpp +++ b/src/OpenColorIO/ops/log/LogUtils.cpp @@ -3,6 +3,7 @@ #include #include +#include #include diff --git a/src/OpenColorIO/ops/log/LogUtils.h b/src/OpenColorIO/ops/log/LogUtils.h index 44246914ac..30656488ab 100644 --- a/src/OpenColorIO/ops/log/LogUtils.h +++ b/src/OpenColorIO/ops/log/LogUtils.h @@ -5,6 +5,8 @@ #ifndef INCLUDED_OCIO_LOGUTILS_H #define INCLUDED_OCIO_LOGUTILS_H +#include + #include #include "ops/log/LogOpData.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOp.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOp.cpp index 412462414b..19cccabe50 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOp.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOp.cpp @@ -2,22 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include #include #include -#include "BitDepthUtils.h" -#include "HashUtils.h" -#include "GpuShaderUtils.h" + #include "MathUtils.h" #include "ops/lut1d/Lut1DOp.h" #include "ops/lut1d/Lut1DOpCPU.h" #include "ops/lut1d/Lut1DOpGPU.h" -#include "ops/matrix/MatrixOp.h" -#include "ops/OpTools.h" -#include "SSE.h" #include "transforms/Lut1DTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOp.h b/src/OpenColorIO/ops/lut1d/Lut1DOp.h index f9f224174e..6ceec9b3ba 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOp.h +++ b/src/OpenColorIO/ops/lut1d/Lut1DOp.h @@ -5,8 +5,6 @@ #ifndef INCLUDED_OCIO_LUT1DOP_H #define INCLUDED_OCIO_LUT1DOP_H -#include - #include #include "ops/lut1d/Lut1DOpData.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU.cpp index 6c618b9fd2..55dc1cd535 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU.cpp @@ -2,17 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include +#include #include -#include +#include #include #include "BitDepthUtils.h" #include "MathUtils.h" #include "ops/lut1d/Lut1DOpCPU.h" -#include "ops/OpTools.h" -#include "Platform.h" #include "SSE.h" #include "CPUInfo.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX.cpp index e0d1648b22..51af4a2e38 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX.cpp @@ -5,7 +5,6 @@ #if OCIO_USE_AVX #include -#include #include "AVX.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX2.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX2.cpp index 32e59ff679..87f6088fab 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX2.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX2.cpp @@ -5,7 +5,6 @@ #if OCIO_USE_AVX2 #include -#include #include "AVX2.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX512.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX512.cpp index 7ca2dbd054..94e46c6ca3 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX512.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_AVX512.cpp @@ -5,7 +5,6 @@ #if OCIO_USE_AVX512 #include -#include #include "AVX512.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp index c170e17914..acad06b9ef 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp @@ -5,8 +5,6 @@ #if OCIO_USE_SSE2 -#include - #include "SSE2.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpData.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpData.cpp index a12a7a3e1f..0a6f93f3d3 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpData.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpData.cpp @@ -1,8 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include -#include +#include #include @@ -11,7 +12,6 @@ #include "MathUtils.h" #include "ops/lut1d/Lut1DOp.h" #include "ops/lut1d/Lut1DOpData.h" -#include "ops/matrix/MatrixOp.h" #include "ops/OpTools.h" #include "ops/range/RangeOpData.h" diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpData.h b/src/OpenColorIO/ops/lut1d/Lut1DOpData.h index d06ca8da6d..f85e931b7c 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpData.h +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpData.h @@ -8,7 +8,6 @@ #include "Op.h" #include "ops/OpArray.h" -#include "PrivateTypes.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/lut1d/Lut1DOpGPU.cpp b/src/OpenColorIO/ops/lut1d/Lut1DOpGPU.cpp index f901859800..fb81b2be88 100644 --- a/src/OpenColorIO/ops/lut1d/Lut1DOpGPU.cpp +++ b/src/OpenColorIO/ops/lut1d/Lut1DOpGPU.cpp @@ -3,6 +3,7 @@ #include #include +#include #include diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOp.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOp.cpp index 4f0de76f4d..b9d370ca92 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOp.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOp.cpp @@ -1,22 +1,17 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include -#include +#include #include +#include #include -#include "BitDepthUtils.h" -#include "GpuShaderUtils.h" -#include "HashUtils.h" -#include "MathUtils.h" #include "ops/lut3d/Lut3DOp.h" #include "ops/lut3d/Lut3DOpCPU.h" #include "ops/lut3d/Lut3DOpGPU.h" -#include "ops/matrix/MatrixOp.h" -#include "ops/OpTools.h" + #include "transforms/Lut3DTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU.cpp index d7ea8483a0..a287c5cdfe 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU.cpp @@ -2,16 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include -#include +#include #include +#include #include -#include "BitDepthUtils.h" #include "MathUtils.h" #include "ops/lut3d/Lut3DOpCPU.h" -#include "ops/OpTools.h" #include "Platform.h" #include "SSE.h" #include "CPUInfo.h" diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX2.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX2.cpp index 96a4ff6f67..e62ea9b8bd 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX2.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX2.cpp @@ -5,7 +5,6 @@ #if OCIO_USE_AVX2 #include -#include #include "AVX2.h" diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX512.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX512.cpp index b659dad4a2..1486d2bd9c 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX512.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX512.cpp @@ -5,7 +5,6 @@ #if OCIO_USE_AVX512 #include -#include #include "AVX512.h" diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpData.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOpData.cpp index e17cbcfce6..008d551c12 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpData.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpData.cpp @@ -2,17 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include -#include "BitDepthUtils.h" #include "HashUtils.h" -#include "MathUtils.h" #include "ops/lut3d/Lut3DOp.h" #include "ops/lut3d/Lut3DOpData.h" #include "ops/OpTools.h" #include "ops/range/RangeOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpData.h b/src/OpenColorIO/ops/lut3d/Lut3DOpData.h index 370f496c74..940ba13913 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpData.h +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpData.h @@ -10,7 +10,6 @@ #include "Op.h" #include "ops/OpArray.h" -#include "PrivateTypes.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/lut3d/Lut3DOpGPU.cpp b/src/OpenColorIO/ops/lut3d/Lut3DOpGPU.cpp index e81bd180b7..3e44972226 100644 --- a/src/OpenColorIO/ops/lut3d/Lut3DOpGPU.cpp +++ b/src/OpenColorIO/ops/lut3d/Lut3DOpGPU.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include #include "GpuShaderUtils.h" -#include "MathUtils.h" #include "ops/lut3d/Lut3DOpGPU.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/ops/matrix/MatrixOp.cpp b/src/OpenColorIO/ops/matrix/MatrixOp.cpp index 93505a284e..fb491b0bf3 100644 --- a/src/OpenColorIO/ops/matrix/MatrixOp.cpp +++ b/src/OpenColorIO/ops/matrix/MatrixOp.cpp @@ -1,15 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include -#include "BitDepthUtils.h" -#include "GpuShaderUtils.h" -#include "HashUtils.h" -#include "MathUtils.h" #include "ops/matrix/MatrixOp.h" #include "ops/matrix/MatrixOpCPU.h" #include "ops/matrix/MatrixOpGPU.h" diff --git a/src/OpenColorIO/ops/matrix/MatrixOp.h b/src/OpenColorIO/ops/matrix/MatrixOp.h index d8020976df..c563da2d22 100644 --- a/src/OpenColorIO/ops/matrix/MatrixOp.h +++ b/src/OpenColorIO/ops/matrix/MatrixOp.h @@ -5,8 +5,6 @@ #ifndef INCLUDED_OCIO_MATRIXOFFSETOP_H #define INCLUDED_OCIO_MATRIXOFFSETOP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/matrix/MatrixOpCPU.cpp b/src/OpenColorIO/ops/matrix/MatrixOpCPU.cpp index a30e0d68ec..c090d6b99f 100644 --- a/src/OpenColorIO/ops/matrix/MatrixOpCPU.cpp +++ b/src/OpenColorIO/ops/matrix/MatrixOpCPU.cpp @@ -3,10 +3,7 @@ #include -#include "BitDepthUtils.h" -#include "MathUtils.h" #include "ops/matrix/MatrixOpCPU.h" -#include "Platform.h" #include "SSE.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/matrix/MatrixOpData.cpp b/src/OpenColorIO/ops/matrix/MatrixOpData.cpp index 9750b154eb..2418787a36 100644 --- a/src/OpenColorIO/ops/matrix/MatrixOpData.cpp +++ b/src/OpenColorIO/ops/matrix/MatrixOpData.cpp @@ -9,7 +9,6 @@ #include "HashUtils.h" #include "MathUtils.h" #include "ops/matrix/MatrixOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/noop/NoOps.cpp b/src/OpenColorIO/ops/noop/NoOps.cpp index cf71b1fde5..698399e778 100644 --- a/src/OpenColorIO/ops/noop/NoOps.cpp +++ b/src/OpenColorIO/ops/noop/NoOps.cpp @@ -3,13 +3,15 @@ #include -#include +#include +#include +#include +#include #include #include "ops/allocation/AllocationOp.h" #include "NoOps.h" -#include "OpBuilders.h" #include "Op.h" #include "ops/lut3d/Lut3DOp.h" diff --git a/src/OpenColorIO/ops/noop/NoOps.h b/src/OpenColorIO/ops/noop/NoOps.h index 8141cbe01e..7b765c987e 100644 --- a/src/OpenColorIO/ops/noop/NoOps.h +++ b/src/OpenColorIO/ops/noop/NoOps.h @@ -9,8 +9,6 @@ #include "Op.h" -#include - namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/range/RangeOp.cpp b/src/OpenColorIO/ops/range/RangeOp.cpp index f708908fbd..7cb49b1016 100644 --- a/src/OpenColorIO/ops/range/RangeOp.cpp +++ b/src/OpenColorIO/ops/range/RangeOp.cpp @@ -1,22 +1,19 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include #include -#include "GpuShaderUtils.h" -#include "HashUtils.h" -#include "MathUtils.h" #include "ops/lut1d/Lut1DOpData.h" #include "ops/lut3d/Lut3DOpData.h" #include "ops/range/RangeOpCPU.h" #include "ops/range/RangeOpGPU.h" #include "ops/range/RangeOp.h" #include "transforms/RangeTransform.h" +#include "ops/matrix/MatrixOp.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/range/RangeOp.h b/src/OpenColorIO/ops/range/RangeOp.h index 4ec2194662..fb21f73113 100644 --- a/src/OpenColorIO/ops/range/RangeOp.h +++ b/src/OpenColorIO/ops/range/RangeOp.h @@ -6,8 +6,6 @@ #define INCLUDED_OCIO_RANGEOP_H -#include - #include #include "Op.h" diff --git a/src/OpenColorIO/ops/range/RangeOpCPU.cpp b/src/OpenColorIO/ops/range/RangeOpCPU.cpp index b78c458b46..c041af099f 100644 --- a/src/OpenColorIO/ops/range/RangeOpCPU.cpp +++ b/src/OpenColorIO/ops/range/RangeOpCPU.cpp @@ -7,7 +7,6 @@ #include #include "MathUtils.h" -#include "ops/matrix/MatrixOpCPU.h" #include "ops/range/RangeOpCPU.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/range/RangeOpData.cpp b/src/OpenColorIO/ops/range/RangeOpData.cpp index 7d3509baf2..237f8003af 100644 --- a/src/OpenColorIO/ops/range/RangeOpData.cpp +++ b/src/OpenColorIO/ops/range/RangeOpData.cpp @@ -1,7 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include +#include +#include #include @@ -9,7 +12,6 @@ #include "MathUtils.h" #include "fileformats/ctf/IndexMapping.h" #include "ops/range/RangeOpData.h" -#include "Platform.h" namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/ops/range/RangeOpData.h b/src/OpenColorIO/ops/range/RangeOpData.h index 9fdde8ec6e..8498dd60ea 100644 --- a/src/OpenColorIO/ops/range/RangeOpData.h +++ b/src/OpenColorIO/ops/range/RangeOpData.h @@ -6,10 +6,13 @@ #define INCLUDED_OCIO_RANGEOPDATA_H +#include + #include #include "Op.h" -#include "ops/matrix/MatrixOp.h" +#include "ops/matrix/MatrixOpData.h" + namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/ops/range/RangeOpGPU.cpp b/src/OpenColorIO/ops/range/RangeOpGPU.cpp index e817912677..854f19b0d9 100644 --- a/src/OpenColorIO/ops/range/RangeOpGPU.cpp +++ b/src/OpenColorIO/ops/range/RangeOpGPU.cpp @@ -1,11 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include "MathUtils.h" #include "ops/range/RangeOpGPU.h" diff --git a/src/OpenColorIO/ops/reference/ReferenceOpData.cpp b/src/OpenColorIO/ops/reference/ReferenceOpData.cpp index 4b8b766f3c..58bd2d169a 100644 --- a/src/OpenColorIO/ops/reference/ReferenceOpData.cpp +++ b/src/OpenColorIO/ops/reference/ReferenceOpData.cpp @@ -4,8 +4,6 @@ #include #include "ops/reference/ReferenceOpData.h" -#include "Platform.h" -#include "transforms/FileTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/AllocationTransform.cpp b/src/OpenColorIO/transforms/AllocationTransform.cpp index eeca74431d..5782bb55ab 100755 --- a/src/OpenColorIO/transforms/AllocationTransform.cpp +++ b/src/OpenColorIO/transforms/AllocationTransform.cpp @@ -2,8 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include +#include #include diff --git a/src/OpenColorIO/transforms/CDLTransform.cpp b/src/OpenColorIO/transforms/CDLTransform.cpp index 393bec4dbe..79cfe09220 100755 --- a/src/OpenColorIO/transforms/CDLTransform.cpp +++ b/src/OpenColorIO/transforms/CDLTransform.cpp @@ -1,19 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include +#include #include #include "fileformats/cdl/CDLParser.h" -#include "Logging.h" -#include "MathUtils.h" -#include "Mutex.h" -#include "OpBuilders.h" #include "ParseUtils.h" -#include "Platform.h" #include "transforms/CDLTransform.h" #include "transforms/FileTransform.h" diff --git a/src/OpenColorIO/transforms/ColorSpaceTransform.cpp b/src/OpenColorIO/transforms/ColorSpaceTransform.cpp index 2039ea66bd..d66ff45bad 100755 --- a/src/OpenColorIO/transforms/ColorSpaceTransform.cpp +++ b/src/OpenColorIO/transforms/ColorSpaceTransform.cpp @@ -2,7 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include @@ -10,7 +12,6 @@ #include "NamedTransform.h" #include "OpBuilders.h" #include "ops/allocation/AllocationOp.h" -#include "ops/noop/NoOps.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/DisplayViewTransform.cpp b/src/OpenColorIO/transforms/DisplayViewTransform.cpp index 629008cf3b..350bbfbdcb 100644 --- a/src/OpenColorIO/transforms/DisplayViewTransform.cpp +++ b/src/OpenColorIO/transforms/DisplayViewTransform.cpp @@ -2,13 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include #include "ContextVariableUtils.h" #include "Display.h" -#include "NamedTransform.h" #include "OpBuilders.h" diff --git a/src/OpenColorIO/transforms/ExponentTransform.cpp b/src/OpenColorIO/transforms/ExponentTransform.cpp index 1ceb576751..4d7af0a961 100755 --- a/src/OpenColorIO/transforms/ExponentTransform.cpp +++ b/src/OpenColorIO/transforms/ExponentTransform.cpp @@ -1,11 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include "OpBuilders.h" #include "transforms/ExponentTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/ExponentWithLinearTransform.cpp b/src/OpenColorIO/transforms/ExponentWithLinearTransform.cpp index 5e93f0aec6..53cf18dca8 100644 --- a/src/OpenColorIO/transforms/ExponentWithLinearTransform.cpp +++ b/src/OpenColorIO/transforms/ExponentWithLinearTransform.cpp @@ -1,11 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include -#include "OpBuilders.h" #include "transforms/ExponentWithLinearTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/ExposureContrastTransform.cpp b/src/OpenColorIO/transforms/ExposureContrastTransform.cpp index 49b8bbb316..5a3f1ca962 100644 --- a/src/OpenColorIO/transforms/ExposureContrastTransform.cpp +++ b/src/OpenColorIO/transforms/ExposureContrastTransform.cpp @@ -1,10 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include #include "transforms/ExposureContrastTransform.h" + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/transforms/FileTransform.cpp b/src/OpenColorIO/transforms/FileTransform.cpp index 33da5f3077..3381512ea0 100755 --- a/src/OpenColorIO/transforms/FileTransform.cpp +++ b/src/OpenColorIO/transforms/FileTransform.cpp @@ -5,9 +5,10 @@ #include #include #include -#include +#include +#include #include -#include +#include #include @@ -17,9 +18,7 @@ #include "FileTransform.h" #include "Logging.h" #include "Mutex.h" -#include "OCIOZArchive.h" #include "ops/noop/NoOps.h" -#include "PathUtils.h" #include "Platform.h" #include "utils/StringUtils.h" @@ -602,8 +601,7 @@ void LoadFileUncached(FileFormat * & returnFormat, { std::ostringstream oss; - oss << "**" << std::endl - << "Opening " << filepath; + oss << "**\nOpening " << filepath; LogDebug(oss.str()); } @@ -638,9 +636,9 @@ void LoadFileUncached(FileFormat * & returnFormat, { std::ostringstream os; os << "The specified FileTransform srcfile, '"; - os << filepath << "', could not be opened. "; - os << "Please confirm the file exists with "; - os << "appropriate read permissions."; + os << filepath << "', could not be opened. " + "Please confirm the file exists with " + "appropriate read permissions."; throw Exception(os.str().c_str()); } @@ -650,7 +648,7 @@ void LoadFileUncached(FileFormat * & returnFormat, { std::ostringstream os; os << " Loaded primary format "; - os << tryFormat->getName() << std::endl; + os << tryFormat->getName() << "\n"; LogDebug(os.str()); } @@ -707,10 +705,10 @@ void LoadFileUncached(FileFormat * & returnFormat, { std::ostringstream os; os << "The specified FileTransform srcfile, '"; - os << filepath << "', could not be opened. "; - os << "Please confirm the file exists with "; - os << "appropriate read"; - os << " permissions."; + os << filepath << "', could not be opened. " + "Please confirm the file exists with " + "appropriate read" + " permissions."; throw Exception(os.str().c_str()); } diff --git a/src/OpenColorIO/transforms/FileTransform.h b/src/OpenColorIO/transforms/FileTransform.h index 19b2b8c73f..a2b99efe2a 100644 --- a/src/OpenColorIO/transforms/FileTransform.h +++ b/src/OpenColorIO/transforms/FileTransform.h @@ -7,12 +7,13 @@ #include +#include +#include +#include #include #include "Op.h" -#include "ops/noop/NoOps.h" -#include "PrivateTypes.h" #include "utils/StringUtils.h" diff --git a/src/OpenColorIO/transforms/FixedFunctionTransform.cpp b/src/OpenColorIO/transforms/FixedFunctionTransform.cpp index 07baef12a9..c2a9a71cbc 100644 --- a/src/OpenColorIO/transforms/FixedFunctionTransform.cpp +++ b/src/OpenColorIO/transforms/FixedFunctionTransform.cpp @@ -1,11 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include +#include #include -#include "OpBuilders.h" #include "transforms/FixedFunctionTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/GradingHueCurveTransform.cpp b/src/OpenColorIO/transforms/GradingHueCurveTransform.cpp index da959e7b48..91ac9412d1 100644 --- a/src/OpenColorIO/transforms/GradingHueCurveTransform.cpp +++ b/src/OpenColorIO/transforms/GradingHueCurveTransform.cpp @@ -1,7 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include diff --git a/src/OpenColorIO/transforms/GradingPrimaryTransform.cpp b/src/OpenColorIO/transforms/GradingPrimaryTransform.cpp index c013866c92..bbc992919c 100644 --- a/src/OpenColorIO/transforms/GradingPrimaryTransform.cpp +++ b/src/OpenColorIO/transforms/GradingPrimaryTransform.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include diff --git a/src/OpenColorIO/transforms/GradingRGBCurveTransform.cpp b/src/OpenColorIO/transforms/GradingRGBCurveTransform.cpp index e9772e667e..ad197abf93 100644 --- a/src/OpenColorIO/transforms/GradingRGBCurveTransform.cpp +++ b/src/OpenColorIO/transforms/GradingRGBCurveTransform.cpp @@ -1,7 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include diff --git a/src/OpenColorIO/transforms/GradingToneTransform.cpp b/src/OpenColorIO/transforms/GradingToneTransform.cpp index 5031612d9a..e2015d0c96 100644 --- a/src/OpenColorIO/transforms/GradingToneTransform.cpp +++ b/src/OpenColorIO/transforms/GradingToneTransform.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include #include diff --git a/src/OpenColorIO/transforms/GroupTransform.cpp b/src/OpenColorIO/transforms/GroupTransform.cpp index 89ba45c267..28851fdfd2 100755 --- a/src/OpenColorIO/transforms/GroupTransform.cpp +++ b/src/OpenColorIO/transforms/GroupTransform.cpp @@ -2,7 +2,10 @@ // Copyright Contributors to the OpenColorIO Project. +#include #include +#include +#include #include diff --git a/src/OpenColorIO/transforms/GroupTransform.h b/src/OpenColorIO/transforms/GroupTransform.h index 038404088a..592918d18a 100644 --- a/src/OpenColorIO/transforms/GroupTransform.h +++ b/src/OpenColorIO/transforms/GroupTransform.h @@ -5,8 +5,13 @@ #ifndef INCLUDED_OCIO_GROUPTRANSFORM_H #define INCLUDED_OCIO_GROUPTRANSFORM_H +#include +#include + #include +#include "fileformats/FormatMetadata.h" + namespace OCIO_NAMESPACE { diff --git a/src/OpenColorIO/transforms/LogAffineTransform.cpp b/src/OpenColorIO/transforms/LogAffineTransform.cpp index 6711a75fea..38be100b49 100644 --- a/src/OpenColorIO/transforms/LogAffineTransform.cpp +++ b/src/OpenColorIO/transforms/LogAffineTransform.cpp @@ -1,9 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include +#include #include diff --git a/src/OpenColorIO/transforms/LogCameraTransform.cpp b/src/OpenColorIO/transforms/LogCameraTransform.cpp index 1f4188417a..b812629da5 100644 --- a/src/OpenColorIO/transforms/LogCameraTransform.cpp +++ b/src/OpenColorIO/transforms/LogCameraTransform.cpp @@ -1,9 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include +#include #include diff --git a/src/OpenColorIO/transforms/LogTransform.cpp b/src/OpenColorIO/transforms/LogTransform.cpp index ad6d13d159..db80e57e22 100755 --- a/src/OpenColorIO/transforms/LogTransform.cpp +++ b/src/OpenColorIO/transforms/LogTransform.cpp @@ -1,9 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include +#include #include diff --git a/src/OpenColorIO/transforms/LookTransform.cpp b/src/OpenColorIO/transforms/LookTransform.cpp index 8d41ba6280..bb711fd576 100755 --- a/src/OpenColorIO/transforms/LookTransform.cpp +++ b/src/OpenColorIO/transforms/LookTransform.cpp @@ -1,16 +1,15 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include -#include -#include +#include #include "ContextVariableUtils.h" #include "LookParse.h" #include "ops/noop/NoOps.h" #include "OpBuilders.h" -#include "ParseUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/Lut1DTransform.cpp b/src/OpenColorIO/transforms/Lut1DTransform.cpp index cc3a9f7f61..bb17c41063 100644 --- a/src/OpenColorIO/transforms/Lut1DTransform.cpp +++ b/src/OpenColorIO/transforms/Lut1DTransform.cpp @@ -2,9 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include -#include +#include #include diff --git a/src/OpenColorIO/transforms/Lut3DTransform.cpp b/src/OpenColorIO/transforms/Lut3DTransform.cpp index 6e1a2babeb..66b8e31d40 100644 --- a/src/OpenColorIO/transforms/Lut3DTransform.cpp +++ b/src/OpenColorIO/transforms/Lut3DTransform.cpp @@ -2,9 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include -#include +#include #include diff --git a/src/OpenColorIO/transforms/MatrixTransform.cpp b/src/OpenColorIO/transforms/MatrixTransform.cpp index ff73b918a0..4c327dba41 100755 --- a/src/OpenColorIO/transforms/MatrixTransform.cpp +++ b/src/OpenColorIO/transforms/MatrixTransform.cpp @@ -2,6 +2,10 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include +#include +#include #include diff --git a/src/OpenColorIO/transforms/RangeTransform.cpp b/src/OpenColorIO/transforms/RangeTransform.cpp index 745cb20e37..8030857d8e 100644 --- a/src/OpenColorIO/transforms/RangeTransform.cpp +++ b/src/OpenColorIO/transforms/RangeTransform.cpp @@ -1,11 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include -#include "MathUtils.h" #include "transforms/RangeTransform.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/builtins/ACES.cpp b/src/OpenColorIO/transforms/builtins/ACES.cpp index 8f08c5829d..b341fb3256 100644 --- a/src/OpenColorIO/transforms/builtins/ACES.cpp +++ b/src/OpenColorIO/transforms/builtins/ACES.cpp @@ -3,6 +3,8 @@ #include +#include +#include #include diff --git a/src/OpenColorIO/transforms/builtins/AppleCameras.cpp b/src/OpenColorIO/transforms/builtins/AppleCameras.cpp index efc4962330..3dfbd8475d 100644 --- a/src/OpenColorIO/transforms/builtins/AppleCameras.cpp +++ b/src/OpenColorIO/transforms/builtins/AppleCameras.cpp @@ -7,8 +7,6 @@ #include #include "ops/matrix/MatrixOp.h" -#include "ops/fixedfunction/FixedFunctionOp.h" -#include "ops/range/RangeOp.h" #include "transforms/builtins/AppleCameras.h" #include "transforms/builtins/BuiltinTransformRegistry.h" #include "transforms/builtins/ColorMatrixHelpers.h" diff --git a/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.cpp b/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.cpp index d828f11ace..cae08f3ed4 100644 --- a/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.cpp +++ b/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.cpp @@ -8,7 +8,6 @@ #include "Mutex.h" #include "ops/matrix/MatrixOp.h" -#include "OpBuilders.h" #include "Platform.h" #include "transforms/builtins/ACES.h" #include "transforms/builtins/AppleCameras.h" @@ -19,7 +18,6 @@ #include "transforms/builtins/PanasonicCameras.h" #include "transforms/builtins/RedCameras.h" #include "transforms/builtins/SonyCameras.h" -#include "utils/StringUtils.h" namespace OCIO_NAMESPACE diff --git a/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.h b/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.h index 36df917201..b389a51c2e 100644 --- a/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.h +++ b/src/OpenColorIO/transforms/builtins/BuiltinTransformRegistry.h @@ -7,6 +7,9 @@ #include +#include +#include +#include #include diff --git a/src/OpenColorIO/transforms/builtins/Displays.cpp b/src/OpenColorIO/transforms/builtins/Displays.cpp index a3e7689b13..e04265f9d0 100644 --- a/src/OpenColorIO/transforms/builtins/Displays.cpp +++ b/src/OpenColorIO/transforms/builtins/Displays.cpp @@ -3,13 +3,15 @@ #include +#include +#include +#include #include #include "ops/fixedfunction/FixedFunctionOp.h" #include "ops/gamma/GammaOp.h" #include "ops/matrix/MatrixOp.h" -#include "ops/range/RangeOp.h" #include "transforms/builtins/BuiltinTransformRegistry.h" #include "transforms/builtins/ColorMatrixHelpers.h" #include "transforms/builtins/Displays.h" diff --git a/src/OpenColorIO/transforms/builtins/PanasonicCameras.cpp b/src/OpenColorIO/transforms/builtins/PanasonicCameras.cpp index 12b5ad10c0..ed773c998c 100644 --- a/src/OpenColorIO/transforms/builtins/PanasonicCameras.cpp +++ b/src/OpenColorIO/transforms/builtins/PanasonicCameras.cpp @@ -2,8 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. -#include - #include #include "ops/matrix/MatrixOp.h" @@ -11,7 +9,6 @@ #include "transforms/builtins/ACES.h" #include "transforms/builtins/BuiltinTransformRegistry.h" #include "transforms/builtins/ColorMatrixHelpers.h" -#include "transforms/builtins/OpHelpers.h" #include "transforms/builtins/PanasonicCameras.h" diff --git a/src/OpenColorIO/transforms/builtins/SonyCameras.cpp b/src/OpenColorIO/transforms/builtins/SonyCameras.cpp index 18d9655e42..5a6156212b 100644 --- a/src/OpenColorIO/transforms/builtins/SonyCameras.cpp +++ b/src/OpenColorIO/transforms/builtins/SonyCameras.cpp @@ -2,15 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. -#include - #include #include "ops/log/LogOp.h" #include "ops/matrix/MatrixOp.h" #include "transforms/builtins/ACES.h" #include "transforms/builtins/BuiltinTransformRegistry.h" -#include "transforms/builtins/OpHelpers.h" #include "transforms/builtins/SonyCameras.h" diff --git a/src/apps/ocioarchive/main.cpp b/src/apps/ocioarchive/main.cpp index 68054a6daf..db04c80813 100644 --- a/src/apps/ocioarchive/main.cpp +++ b/src/apps/ocioarchive/main.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include "utils/StringUtils.h" @@ -80,7 +82,7 @@ int main(int argc, const char **argv) if (ap.parse (argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; exit(1); } @@ -96,7 +98,7 @@ int main(int argc, const char **argv) { if (args.size() != 1) { - std::cerr << "ERROR: Missing the name of the archive to create." << std::endl; + std::cerr << "ERROR: Missing the name of the archive to create.\n"; exit(1); } @@ -115,7 +117,7 @@ int main(int argc, const char **argv) catch (...) { // Capture any errors and display a custom message. - std::cerr << "ERROR: Could not load config: " << configFilename << std::endl; + std::cerr << "ERROR: Could not load config: " << configFilename << "\n"; exit(1); } @@ -123,7 +125,7 @@ int main(int argc, const char **argv) else if (ocioEnv && *ocioEnv) { // Archive a config from the environment variable. - std::cout << "Archiving $OCIO=" << ocioEnv << std::endl; + std::cout << "Archiving $OCIO=" << ocioEnv << "\n"; try { config = OCIO::Config::CreateFromEnv(); @@ -132,13 +134,13 @@ int main(int argc, const char **argv) { // Capture any errors and display a custom message. std::cerr << "ERROR: Could not load config from $OCIO variable: " - << ocioEnv << std::endl; + << ocioEnv << "\n"; exit(1); } } else { - std::cerr << "ERROR: You must specify an input OCIO configuration." << std::endl; + std::cerr << "ERROR: You must specify an input OCIO configuration.\n"; exit(1); } @@ -163,29 +165,29 @@ int main(int argc, const char **argv) { std::cerr << "Could not open output stream for: " << archiveName + std::string(OCIO::OCIO_CONFIG_ARCHIVE_FILE_EXT) - << std::endl; + << "\n"; exit(1); } } catch (OCIO::Exception & e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; exit(1); } } catch (OCIO::Exception & exception) { - std::cerr << "ERROR: " << exception.what() << std::endl; + std::cerr << "ERROR: " << exception.what() << "\n"; exit(1); } catch (std::exception& exception) { - std::cerr << "ERROR: " << exception.what() << std::endl; + std::cerr << "ERROR: " << exception.what() << "\n"; exit(1); } catch (...) { - std::cerr << "ERROR: Unknown problem encountered." << std::endl; + std::cerr << "ERROR: Unknown problem encountered.\n"; exit(1); } } @@ -196,7 +198,7 @@ int main(int argc, const char **argv) { if (args.size() != 1) { - std::cerr << "ERROR: Missing the name of the archive to extract." << std::endl; + std::cerr << "ERROR: Missing the name of the archive to extract.\n"; exit(1); } @@ -215,11 +217,11 @@ int main(int argc, const char **argv) } OCIO::ExtractOCIOZArchive(archiveName.c_str(), extractDestination.c_str()); - std::cout << archiveName << " has been extracted." << std::endl; + std::cout << archiveName << " has been extracted.\n"; } catch (OCIO::Exception & e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; exit(1); } } @@ -230,7 +232,7 @@ int main(int argc, const char **argv) { if (args.size() < 1) { - std::cerr << "ERROR: Missing the name of the archive to list." << std::endl; + std::cerr << "ERROR: Missing the name of the archive to list.\n"; exit(1); } @@ -245,34 +247,34 @@ int main(int argc, const char **argv) err = mz_zip_reader_open_file(reader, path.c_str()); if (err != MZ_OK) { - std::cerr << "ERROR: File not found: " << path << std::endl; + std::cerr << "ERROR: File not found: " << path << "\n"; exit(1); } err = mz_zip_reader_goto_first_entry(reader); if (err != MZ_OK) { - std::cerr << "ERROR: Could not find the first entry in the archive." << std::endl; + std::cerr << "ERROR: Could not find the first entry in the archive.\n"; exit(1); } - std::cout << "\nThe archive contains the following files:\n" << std::endl; - std::cout << " Date Time CRC-32 Name" << std::endl; - std::cout << " ---- ---- ------ ----" << std::endl; + std::cout << "\nThe archive contains the following files:\n\n"; + std::cout << " Date Time CRC-32 Name\n"; + std::cout << " ---- ---- ------ ----\n" << std::flush; do { err = mz_zip_reader_entry_get_info(reader, &file_info); if (err != MZ_OK) { std::cerr << "ERROR: Could not get information from entry: " << file_info->filename - << std::endl; + << "\n"; exit(1); } mz_zip_time_t_to_tm(file_info->modified_date, &tmu_date); // Print entry information. - printf(" %2.2" PRIu32 "-%2.2" PRIu32 "-%2.2" PRIu32 " %2.2" PRIu32 \ + printf(" %2.2" PRIu32 "-%2.2" PRIu32 "-%2.2" PRIu32 " %2.2" PRIu32 ":%2.2" PRIu32 " %8.8" PRIx32 " %s\n", (uint32_t)tmu_date.tm_mon + 1, (uint32_t)tmu_date.tm_mday, (uint32_t)tmu_date.tm_year % 100, @@ -288,7 +290,7 @@ int main(int argc, const char **argv) else { std::cerr << "Archive, extract, and/or list functions " - "may not be used at the same time." << std::endl; + "may not be used at the same time.\n"; exit(1); } } diff --git a/src/apps/ociobakelut/main.cpp b/src/apps/ociobakelut/main.cpp index 95a9377fa4..52060f4484 100644 --- a/src/apps/ociobakelut/main.cpp +++ b/src/apps/ociobakelut/main.cpp @@ -2,12 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. -#include #include #include +#include #include #include -#include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -116,7 +116,7 @@ int main (int argc, const char* argv[]) if (ap.parse(argc, argv) < 0) { - std::cout << ap.geterror() << std::endl; + std::cout << ap.geterror() << "\n"; ap.usage(); std::cout << "\n"; return 1; @@ -146,21 +146,21 @@ int main (int argc, const char* argv[]) } catch(const OCIO::Exception & e) { - std::cerr << "\nERROR: " << e.what() << std::endl; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "\nERROR: " << e.what() << "\n"; + std::cerr << "See --help for more info.\n"; return 1; } catch(...) { - std::cerr << "\nERROR: An unknown error occurred in parse_luts" << std::endl; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "\nERROR: An unknown error occurred in parse_luts\n"; + std::cerr << "See --help for more info.\n"; return 1; } if(!groupTransform) { - std::cerr << "\nERROR: parse_luts returned null transform" << std::endl; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "\nERROR: parse_luts returned null transform\n"; + std::cerr << "See --help for more info.\n"; return 1; } @@ -171,31 +171,31 @@ int main (int argc, const char* argv[]) if(!inputspace.empty()) { std::cerr << "\nERROR: --inputspace is not allowed when using --lut\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(!outputspace.empty()) { std::cerr << "\nERROR: --outputspace is not allowed when using --lut\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(!looks.empty()) { std::cerr << "\nERROR: --looks is not allowed when using --lut\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(!shaperspace.empty()) { std::cerr << "\nERROR: --shaperspace is not allowed when using --lut\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(!display.empty() || !view.empty()) { std::cerr << "\nERROR: --displayview is not allowed when using --lut\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } @@ -229,35 +229,35 @@ int main (int argc, const char* argv[]) if(inputspace.empty()) { std::cerr << "\nERROR: You must specify the --inputspace.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(outputspace.empty() && (display.empty() && view.empty())) { std::cerr << "\nERROR: You must specify either --outputspace or --displayview.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(display.empty() ^ view.empty()) { std::cerr << "\nERROR: You must specify both display and view with --displayview.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(format.empty()) { std::cerr << "\nERROR: You must specify the LUT format using --format.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(!inputconfig.empty()) { if(!usestdout && verbose) - std::cout << "[OpenColorIO INFO]: Loading " << inputconfig << std::endl; + std::cout << "[OpenColorIO INFO]: Loading " << inputconfig << "\n"; config = OCIO::Config::CreateFromFile(inputconfig.c_str()); } else if(OCIO::GetEnvVariable("OCIO")) @@ -265,7 +265,7 @@ int main (int argc, const char* argv[]) if(!usestdout && verbose) { std::cout << "[OpenColorIO INFO]: Loading $OCIO " - << OCIO::GetEnvVariable("OCIO") << std::endl; + << OCIO::GetEnvVariable("OCIO") << "\n"; } config = OCIO::Config::CreateFromEnv(); } @@ -281,7 +281,7 @@ int main (int argc, const char* argv[]) if(outputfile.empty() && !usestdout) { std::cerr << "\nERROR: You must specify the outputfile or --stdout.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } @@ -295,20 +295,20 @@ int main (int argc, const char* argv[]) { description = outputfile; if(verbose) - std::cout << "[OpenColorIO INFO]: \"--description\" set to default value of filename.icc: " << outputfile << "" << std::endl; + std::cout << "[OpenColorIO INFO]: \"--description\" set to default value of filename.icc: " << outputfile << "\n"; } if(usestdout) { std::cerr << "\nERROR: --stdout not supported when writing ICC profiles.\n\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } if(outputfile.empty()) { std::cerr << "ERROR: you need to specify a output ICC path\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } @@ -374,7 +374,7 @@ int main (int argc, const char* argv[]) std::ostringstream output; if(!usestdout && verbose) - std::cout << "[OpenColorIO INFO]: Baking '" << format << "' LUT" << std::endl; + std::cout << "[OpenColorIO INFO]: Baking '" << format << "' LUT\n"; if(usestdout) { @@ -385,31 +385,31 @@ int main (int argc, const char* argv[]) std::ofstream f(outputfile.c_str()); if(f.fail()) { - std::cerr << "ERROR: Non-writable file path " << outputfile << " specified." << std::endl; + std::cerr << "ERROR: Non-writable file path " << outputfile << " specified.\n"; return 1; } baker->bake(f); if(verbose) - std::cout << "[OpenColorIO INFO]: Wrote '" << outputfile << "'" << std::endl; + std::cout << "[OpenColorIO INFO]: Wrote '" << outputfile << "'\n"; } } } catch(OCIO::Exception & exception) { - std::cerr << "OCIO Error: " << exception.what() << std::endl; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "OCIO Error: " << exception.what() << "\n"; + std::cerr << "See --help for more info.\n"; return 1; } catch (std::exception& exception) { std::cerr << "Error: " << exception.what() << "\n"; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "See --help for more info.\n"; return 1; } catch(...) { - std::cerr << "Unknown OCIO error encountered." << std::endl; - std::cerr << "See --help for more info." << std::endl; + std::cerr << "Unknown OCIO error encountered.\n"; + std::cerr << "See --help for more info.\n"; return 1; } diff --git a/src/apps/ociobakelut/ocioicc.cpp b/src/apps/ociobakelut/ocioicc.cpp index 55f5d7e407..23a1d72542 100644 --- a/src/apps/ociobakelut/ocioicc.cpp +++ b/src/apps/ociobakelut/ocioicc.cpp @@ -1,12 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include #include #include -#include -#include #include #include @@ -215,7 +211,7 @@ void SaveICCProfileToFile(const std::string & outputfile, // Write // if(verbose) - std::cout << "[OpenColorIO INFO]: Writing " << outputfile << std::endl; + std::cout << "[OpenColorIO INFO]: Writing " << outputfile << "\n"; cmsSaveProfileToFile(hProfile, outputfile.c_str()); cmsCloseProfile(hProfile); diff --git a/src/apps/ociocheck/main.cpp b/src/apps/ociocheck/main.cpp index 5a0c24524a..b0daf31e76 100644 --- a/src/apps/ociocheck/main.cpp +++ b/src/apps/ociocheck/main.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -79,8 +79,7 @@ bool isValidInteropID(const std::string& id) { std::cout << "WARNING: InteropID '" << id << "' is not valid. " "It should either be one of the Color Interop Forum standard IDs or " - "it must contain a namespace followed by ':', e.g. 'mycompany:mycolorspace'." << - std::endl; + "it must contain a namespace followed by ':', e.g. 'mycompany:mycolorspace'.\n"; return false; } } @@ -95,7 +94,7 @@ bool isValidInteropID(const std::string& id) { std::cout << "WARNING: InteropID '" << id << "' is not valid. " "The ID part must not be one of the Color Interop Forum standard IDs " - "when a namespace is used." << std::endl; + "when a namespace is used.\n"; return false; } } @@ -122,7 +121,7 @@ int main(int argc, const char **argv) if (ap.parse(argc, argv) < 0) { - std::cout << ap.geterror() << std::endl; + std::cout << ap.geterror() << "\n"; ap.usage(); std::cout << DESC_STRING; return 1; @@ -142,27 +141,23 @@ int main(int argc, const char **argv) { OCIO::ConstConfigRcPtr srcConfig; - std::cout << std::endl; - std::cout << "OpenColorIO Library Version: " << OCIO::GetVersion() << std::endl; - std::cout << "OpenColorIO Library VersionHex: " << OCIO::GetVersionHex() << std::endl; + std::cout << "\nOpenColorIO Library Version: " << OCIO::GetVersion() << "\n" + "OpenColorIO Library VersionHex: " << OCIO::GetVersionHex() << "\n"; if(!inputconfig.empty()) { - std::cout << std::endl; - std::cout << "Loading " << inputconfig << std::endl; + std::cout << "\nLoading " << inputconfig << "\n"; srcConfig = OCIO::Config::CreateFromFile(inputconfig.c_str()); } else if(OCIO::GetEnvVariable("OCIO")) { - std::cout << std::endl; - std::cout << "Loading $OCIO " << OCIO::GetEnvVariable("OCIO") << std::endl; + std::cout << "\nLoading $OCIO " << OCIO::GetEnvVariable("OCIO") << "\n"; srcConfig = OCIO::Config::CreateFromEnv(); } else { - std::cout << std::endl; - std::cout << "ERROR: You must specify an input OCIO configuration "; - std::cout << "(either with --iconfig or $OCIO).\n"; + std::cout << "\nERROR: You must specify an input OCIO configuration " + "(either with --iconfig or $OCIO).\n"; ap.usage (); std::cout << DESC_STRING; return 1; @@ -173,46 +168,43 @@ int main(int argc, const char **argv) OCIO::ConfigRcPtr config = srcConfig->createEditableCopy(); config->setProcessorCacheFlags(OCIO::PROCESSOR_CACHE_OFF); - std::cout << std::endl; - std::cout << "** General **" << std::endl; + std::cout << "\n** General **\n"; if (config->getNumEnvironmentVars() > 0) { - std::cout << "Environment:" << std::endl; + std::cout << "Environment:\n"; for (int idx = 0; idx < config->getNumEnvironmentVars(); ++idx) { const char * name = config->getEnvironmentVarNameByIndex(idx); std::cout << " " << name << ": " << config->getEnvironmentVarDefault(name) - << std::endl; + << "\n"; } } else { if (config->getEnvironmentMode() == OCIO::ENV_ENVIRONMENT_LOAD_PREDEFINED) { - std::cout << "Environment: {}" << std::endl; + std::cout << "Environment: {}\n"; } else { - std::cout << "Environment: " << std::endl; + std::cout << "Environment: \n"; } } - std::cout << "Search Path: " << config->getSearchPath() << std::endl; - std::cout << "Working Dir: " << config->getWorkingDir() << std::endl; + std::cout << "Search Path: " << config->getSearchPath() << "\n"; + std::cout << "Working Dir: " << config->getWorkingDir() << "\n"; if (config->getNumDisplays() == 0) { - std::cout << std::endl; - std::cout << "ERROR: At least one (display, view) pair must be defined." << std::endl; + std::cout << "\nERROR: At least one (display, view) pair must be defined.\n"; errorcount += 1; } else { - std::cout << std::endl; - std::cout << "Default Display: " << config->getDefaultDisplay() << std::endl; - std::cout << "Default View: " << config->getDefaultView(config->getDefaultDisplay()) << std::endl; + std::cout << "\nDefault Display: " << config->getDefaultDisplay() << "\n"; + std::cout << "Default View: " << config->getDefaultView(config->getDefaultDisplay()) << "\n"; // It's important that the getProcessor call below always loads the transforms // involved in each display/view pair. However, if the src color space is a @@ -231,8 +223,7 @@ int main(int argc, const char **argv) if (config->getNumColorSpaces() > 0) { - std::cout << std::endl; - std::cout << "** (Display, View) pairs **" << std::endl; + std::cout << "\n** (Display, View) pairs **\n"; // Iterate over all displays & views (active & inactive). @@ -255,12 +246,11 @@ int main(int argc, const char **argv) viewName, OCIO::TRANSFORM_DIR_FORWARD); - std::cout << "(" << displayName << ", " << viewName << ")" - << std::endl; + std::cout << "(" << displayName << ", " << viewName << ")\n"; } catch(OCIO::Exception & exception) { - std::cout << "ERROR: " << exception.what() << std::endl; + std::cout << "ERROR: " << exception.what() << "\n"; errorcount += 1; } } @@ -279,12 +269,11 @@ int main(int argc, const char **argv) viewName, OCIO::TRANSFORM_DIR_FORWARD); - std::cout << "(" << displayName << ", " << viewName << ")" - << std::endl; + std::cout << "(" << displayName << ", " << viewName << ")\n"; } catch(OCIO::Exception & exception) { - std::cout << "ERROR: " << exception.what() << std::endl; + std::cout << "ERROR: " << exception.what() << "\n"; errorcount += 1; } } @@ -293,8 +282,7 @@ int main(int argc, const char **argv) } { - std::cout << std::endl; - std::cout << "** Roles **" << std::endl; + std::cout << "\n** Roles **\n"; // All roles defined in OpenColorTypes.h. std::set allRolesSet = { @@ -322,17 +310,17 @@ int main(int argc, const char **argv) { if(allRolesSet.find(role) != allRolesSet.end()) { - std::cout << cs->getName() << " (" << role << ")" << std::endl; + std::cout << cs->getName() << " (" << role << ")\n"; } else { - std::cout << cs->getName() << " (" << role << ": user)" << std::endl; + std::cout << cs->getName() << " (" << role << ": user)\n"; } } else { // Note: The config->validate check below will also fail due to this. - std::cout << "ERROR: SPACE MISSING (" << role << ")" << std::endl; + std::cout << "ERROR: SPACE MISSING (" << role << ")\n"; errorcount += 1; } } @@ -357,15 +345,14 @@ int main(int argc, const char **argv) OCIO::ConstColorSpaceRcPtr cs = config->getColorSpace(role.c_str()); if(!cs) { - std::cout << "WARNING: NOT DEFINED (" << role << ")" << std::endl; + std::cout << "WARNING: NOT DEFINED (" << role << ")\n"; warningcount += 1; } } } { - std::cout << std::endl; - std::cout << "** ColorSpaces **" << std::endl; + std::cout << "\n** ColorSpaces **\n"; const int numCS = config->getNumColorSpaces( OCIO::SEARCH_REFERENCE_SPACE_ALL, // Iterate over scene & display color spaces. @@ -434,21 +421,21 @@ int main(int argc, const char **argv) { // There was a problem with one of the color space's transforms. std::cout << cs->getName(); - std::cout << " -- error" << std::endl; + std::cout << " -- error\n"; if(!toRefOK) { - std::cout << "\t" << toRefErrorText << std::endl; + std::cout << "\t" << toRefErrorText << "\n"; } if(!fromRefOK) { - std::cout << "\t" << fromRefErrorText << std::endl; + std::cout << "\t" << fromRefErrorText << "\n"; } errorcount += 1; } else { // The color space's transforms load ok. - std::cout << cs->getName() << std::endl; + std::cout << cs->getName() << "\n"; } } @@ -462,14 +449,13 @@ int main(int argc, const char **argv) } { - std::cout << std::endl; - std::cout << "** Named Transforms **" << std::endl; + std::cout << "\n** Named Transforms **\n"; // Iterate over active & inactive named transforms. const int numNT = config->getNumNamedTransforms(OCIO::NAMEDTRANSFORM_ALL); if(numNT==0) { - std::cout << "no named transforms defined" << std::endl; + std::cout << "no named transforms defined\n"; } bool foundCategory = false; @@ -524,21 +510,21 @@ int main(int argc, const char **argv) { // There was a problem with one of the named transform's transforms. std::cout << nt->getName(); - std::cout << " -- error" << std::endl; + std::cout << " -- error\n"; if(!fwdOK) { - std::cout << "\t" << fwdErrorText << std::endl; + std::cout << "\t" << fwdErrorText << "\n"; } if(!invOK) { - std::cout << "\t" << invErrorText << std::endl; + std::cout << "\t" << invErrorText << "\n"; } errorcount += 1; } else { // The named transform's transforms load ok. - std::cout << nt->getName() << std::endl; + std::cout << nt->getName() << "\n"; } } @@ -552,13 +538,12 @@ int main(int argc, const char **argv) } { - std::cout << std::endl; - std::cout << "** Looks **" << std::endl; + std::cout << "\n** Looks **\n"; const int numL = config->getNumLooks(); if(numL==0) { - std::cout << "no looks defined" << std::endl; + std::cout << "no looks defined\n"; } for(int i=0; igetName(); - std::cout << " -- error" << std::endl; + std::cout << " -- error\n"; if(!fwdOK) { - std::cout << "\t" << fwdErrorText << std::endl; + std::cout << "\t" << fwdErrorText << "\n"; } if(!invOK) { - std::cout << "\t" << invErrorText << std::endl; + std::cout << "\t" << invErrorText << "\n"; } errorcount += 1; } else { // The look transform's transforms load ok. - std::cout << look->getName() << std::endl; + std::cout << look->getName() << "\n"; } } } - std::cout << std::endl; - std::cout << "** Validation **" << std::endl; + std::cout << "\n** Validation **\n"; std::string cacheID; bool isArchivable = false; @@ -641,26 +625,25 @@ int main(int argc, const char **argv) StringUtils::StringVec svec = StringUtils::SplitByLines(logGuard.output()); if (!StringUtils::Contain(svec, "[OpenColorIO Error]")) { - std::cout << "Validation: passed" << std::endl; + std::cout << "Validation: passed\n"; } else { - std::cout << "Validation: failed" << std::endl; + std::cout << "Validation: failed\n"; errorcount += 1; } } catch(OCIO::Exception & exception) { - std::cout << "ERROR:" << std::endl; + std::cout << "ERROR:\n"; errorcount += 1; - std::cout << exception.what() << std::endl; - std::cout << "Validation: failed" << std::endl; + std::cout << exception.what() << "\n"; + std::cout << "Validation: failed\n"; } - std::cout << std::endl; - std::cout << "** Miscellaneous **" << std::endl; - std::cout << "CacheID: " << cacheID << std::endl; - std::cout << "Archivable: " << (isArchivable ? "yes" : "no") << std::endl; + std::cout << "\n** Miscellaneous **\n"; + std::cout << "CacheID: " << cacheID << "\n"; + std::cout << "Archivable: " << (isArchivable ? "yes" : "no") << "\n"; if(!outputconfig.empty()) { @@ -669,19 +652,19 @@ int main(int argc, const char **argv) if(!output.is_open()) { - std::cout << "Error opening " << outputconfig << " for writing." << std::endl; + std::cout << "Error opening " << outputconfig << " for writing.\n"; } else { config->serialize(output); output.close(); - std::cout << "Wrote " << outputconfig << std::endl; + std::cout << "Wrote " << outputconfig << "\n"; } } } catch(OCIO::Exception & exception) { - std::cout << "ERROR: " << exception.what() << std::endl; + std::cout << "ERROR: " << exception.what() << "\n"; return 1; } catch (std::exception& exception) { std::cout << "ERROR: " << exception.what() << "\n"; @@ -689,24 +672,24 @@ int main(int argc, const char **argv) } catch(...) { - std::cout << "Unknown error encountered." << std::endl; + std::cout << "Unknown error encountered.\n"; return 1; } if(warningcount > 0) { - std::cout << "\nWarnings encountered: " << warningcount << std::endl; + std::cout << "\nWarnings encountered: " << warningcount << "\n"; } - std::cout << std::endl; + std::cout << "\n"; if(errorcount == 0) { - std::cout << "Tests complete." << std::endl << std::endl; + std::cout << "Tests complete.\n\n"; return 0; } else { - std::cout << errorcount << " tests failed." << std::endl << std::endl; + std::cout << errorcount << " tests failed.\n\n"; return 1; } } \ No newline at end of file diff --git a/src/apps/ociochecklut/main.cpp b/src/apps/ociochecklut/main.cpp index 9469090a15..fa3cb4308c 100644 --- a/src/apps/ociochecklut/main.cpp +++ b/src/apps/ociochecklut/main.cpp @@ -215,19 +215,18 @@ int main (int argc, const char* argv[]) if (ap.parse(argc, argv) < 0 || help || inputfile.empty()) { - std::cout << ap.geterror() << std::endl; + std::cout << ap.geterror() << "\n"; ap.usage(); - std::cout << DESC_STRING << std::endl; + std::cout << DESC_STRING << "\n"; if (help) { // What are the allowed formats? - std::cout << "Formats supported:" << std::endl; + std::cout << "Formats supported:\n"; const auto nbFormats = OCIO::FileTransform::GetNumFormats(); for (int i = 0; i < nbFormats; ++i) { std::cout << OCIO::FileTransform::GetFormatNameByIndex(i); - std::cout << " (." << OCIO::FileTransform::GetFormatExtensionByIndex(i) << ")"; - std::cout << std::endl; + std::cout << " (." << OCIO::FileTransform::GetFormatExtensionByIndex(i) << ")\n"; } return 0; } @@ -237,15 +236,13 @@ int main (int argc, const char* argv[]) if (verbose) { - std::cout << std::endl; - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "\nOCIO Version: " << OCIO::GetVersion() << "\n"; } #ifndef OCIO_GPU_ENABLED if (usegpu || outputgpuInfo || usegpuLegacy) { - std::cerr << "Compiled without OpenGL support, GPU options are not available."; - std::cerr << std::endl; + std::cerr << "Compiled without OpenGL support, GPU options are not available.\n"; return 1; } #endif // OCIO_GPU_ENABLED @@ -275,15 +272,15 @@ int main (int argc, const char* argv[]) if (printops) { auto transform = processor->createGroupTransform(); - std::cout << "Transform operators: " << std::endl; + std::cout << "Transform operators:\n"; const auto numTransforms = transform->getNumTransforms(); for (int i = 0; i < numTransforms; ++i) { - std::cout << "\t" << *(transform->getTransform(i)) << std::endl; + std::cout << "\t" << *(transform->getTransform(i)) << "\n"; } if (numTransforms == 0) { - std::cout << "No transform." << std::endl; + std::cout << "No transform.\n"; } } if (usegpu || usegpuLegacy) @@ -298,12 +295,12 @@ int main (int argc, const char* argv[]) } catch (const OCIO::Exception & exception) { - std::cerr << "ERROR: " << exception.what() << std::endl; + std::cerr << "ERROR: " << exception.what() << "\n"; return 1; } catch (...) { - std::cerr << "ERROR: Unknown error encountered while creating processor." << std::endl; + std::cerr << "ERROR: Unknown error encountered while creating processor.\n"; return 1; } @@ -319,8 +316,7 @@ int main (int argc, const char* argv[]) if (test && numInput > 0) { - std::cerr << "ERROR: Expecting either RGB (or RGBA) pixel or predefined RGB values (i.e. -t)." - << std::endl; + std::cerr << "ERROR: Expecting either RGB (or RGBA) pixel or predefined RGB values (i.e. -t).\n"; return 1; } @@ -331,8 +327,7 @@ int main (int argc, const char* argv[]) } else if (numInput != 3 && !test) { - std::cerr << "ERROR: Expecting either RGB or RGBA pixel." - << std::endl; + std::cerr << "ERROR: Expecting either RGB or RGBA pixel.\n"; return 1; } @@ -354,7 +349,7 @@ int main (int argc, const char* argv[]) if (verbose || stepInfo) { - std::cout << std::endl; + std::cout << "\n"; } while (validInput) @@ -376,7 +371,7 @@ int main (int argc, const char* argv[]) std::vector outputPixel = pixel; const auto numTransforms = transform->getNumTransforms(); - std::cout << std::endl; + std::cout << "\n"; for (int i = 0; i < numTransforms; ++i) { @@ -403,7 +398,7 @@ int main (int argc, const char* argv[]) std::vector out; ToString(out, outputPixel, 0, comp); - std::cout << "\n" << *(transform->getTransform(i)) << std::endl; + std::cout << "\n" << *(transform->getTransform(i)) << "\n"; std::cout << "Input [R G B"; if (comp == 4) { @@ -411,7 +406,7 @@ int main (int argc, const char* argv[]) } std::cout << "]: ["; PrintAlignedVec(in, out, comp); - std::cout << "]" << std::endl; + std::cout << "]\n"; std::cout << "Output [R G B"; if (comp == 4) @@ -420,19 +415,19 @@ int main (int argc, const char* argv[]) } std::cout << "]: ["; PrintAlignedVec(out, in, comp); - std::cout << "]" << std::endl; + std::cout << "]\n"; inputPixel = outputPixel; } } catch (const OCIO::Exception& exception) { - std::cerr << "ERROR: " << exception.what() << std::endl; + std::cerr << "ERROR: " << exception.what() << "\n"; return 1; } catch (...) { - std::cerr << "ERROR: Unknown error encountered while processing single step operator." << std::endl; + std::cerr << "ERROR: Unknown error encountered while processing single step operator.\n"; return 1; } @@ -447,12 +442,12 @@ int main (int argc, const char* argv[]) } catch (const OCIO::Exception& e) { - std::cerr << "ERROR: Processing pixel: " << e.what() << std::endl; + std::cerr << "ERROR: Processing pixel: " << e.what() << "\n"; return 1; } catch (...) { - std::cerr << "ERROR: Unknown error encountered while processing pixel." << std::endl; + std::cerr << "ERROR: Unknown error encountered while processing pixel.\n"; return 1; } @@ -461,7 +456,7 @@ int main (int argc, const char* argv[]) std::vector out; ToString(out, pixel, 0, comp); - std::cout << std::endl; + std::cout << "\n"; if (verbose) { @@ -475,7 +470,7 @@ int main (int argc, const char* argv[]) } std::cout << "]: ["; PrintAlignedVec(in, out, comp); - std::cout << "]" << std::endl; + std::cout << "]\n"; std::cout << "Output [R G B"; if (comp == 4) @@ -484,7 +479,7 @@ int main (int argc, const char* argv[]) } std::cout << "]: ["; PrintAlignedVec(out, in, comp); - std::cout << "]" << std::endl; + std::cout << "]\n"; } else { @@ -493,7 +488,7 @@ int main (int argc, const char* argv[]) { std::cout << " " << out[3]; } - std::cout << std::endl; + std::cout << "\n"; } curPix += comp; } @@ -502,7 +497,7 @@ int main (int argc, const char* argv[]) { if (verbose) { - std::cout << "Testing with predefined set of RGB pixels." << std::endl; + std::cout << "Testing with predefined set of RGB pixels.\n"; } input = input4test; comp = 3; diff --git a/src/apps/ocioconvert/main.cpp b/src/apps/ocioconvert/main.cpp index 31a5ed3542..fd1f26daa0 100644 --- a/src/apps/ocioconvert/main.cpp +++ b/src/apps/ocioconvert/main.cpp @@ -5,8 +5,8 @@ #include #include #include -#include #include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -100,7 +100,7 @@ int main(int argc, const char **argv) if (ap.parse (argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage (); exit(1); } @@ -114,8 +114,7 @@ int main(int argc, const char **argv) #ifndef OCIO_GPU_ENABLED if (usegpu || outputgpuInfo || usegpuLegacy) { - std::cerr << "Compiled without OpenGL support, GPU options are not available."; - std::cerr << std::endl; + std::cerr << "Compiled without OpenGL support, GPU options are not available.\n"; exit(1); } #endif // OCIO_GPU_ENABLED @@ -159,7 +158,7 @@ int main(int argc, const char **argv) if (args.size() != 4) { std::cerr << "ERROR: Expecting 4 arguments, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -170,7 +169,7 @@ int main(int argc, const char **argv) } else if (useLut && useDisplayView) { - std::cerr << "ERROR: Options lut & view can't be used at the same time." << std::endl; + std::cerr << "ERROR: Options lut & view can't be used at the same time.\n"; ap.usage(); exit(1); } @@ -179,7 +178,7 @@ int main(int argc, const char **argv) if (args.size() != 3) { std::cerr << "ERROR: Expecting 3 arguments for --lut option, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -192,7 +191,7 @@ int main(int argc, const char **argv) if (args.size() != 5) { std::cerr << "ERROR: Expecting 5 arguments for --view option, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -204,7 +203,7 @@ int main(int argc, const char **argv) } else if (useDisplayView && useInvertView) { - std::cerr << "ERROR: Options view & invertview can't be used at the same time." << std::endl; + std::cerr << "ERROR: Options view & invertview can't be used at the same time.\n"; ap.usage(); exit(1); } @@ -213,7 +212,7 @@ int main(int argc, const char **argv) if (args.size() != 5) { std::cerr << "ERROR: Expecting 5 arguments for --invertview option, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -227,8 +226,8 @@ int main(int argc, const char **argv) { if (useLut || useDisplayView || useInvertView || useInvNamedTransform) { - std::cerr << "ERROR: Option namedtransform can't be used with lut, view, invertview, \ - or invnamedtransform at the same time." << std::endl; + std::cerr << "ERROR: Option namedtransform can't be used with lut, view, invertview, " + "or invnamedtransform at the same time.\n"; ap.usage(); exit(1); } @@ -236,7 +235,7 @@ int main(int argc, const char **argv) if (args.size() != 3) { std::cerr << "ERROR: Expecting 3 arguments for --namedtransform option, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -249,8 +248,8 @@ int main(int argc, const char **argv) { if (useLut || useDisplayView || useInvertView || useNamedTransform) { - std::cerr << "ERROR: Option invnamedtransform can't be used with lut, view, invertview, \ - or namedtransform at the same time." << std::endl; + std::cerr << "ERROR: Option invnamedtransform can't be used with lut, view, invertview, " + "or namedtransform at the same time.\n"; ap.usage(); exit(1); } @@ -258,7 +257,7 @@ int main(int argc, const char **argv) if (args.size() != 3) { std::cerr << "ERROR: Expecting 3 arguments for --invnamedtransform option, found " - << args.size() << "." << std::endl; + << args.size() << ".\n"; ap.usage(); exit(1); } @@ -291,40 +290,37 @@ int main(int argc, const char **argv) } catch (const OCIO::Exception & e) { - std::cout << "ERROR loading config file: " << e.what() << std::endl; + std::cout << "ERROR loading config file: " << e.what() << "\n"; exit(1); } catch (...) { - std::cerr << "ERROR loading config file: '" << inputconfig << "'" << std::endl; + std::cerr << "ERROR loading config file: '" << inputconfig << "'\n"; exit(1); } if (verbose) { - std::cout << std::endl; - std::cout << OCIO::ImageIO::GetVersion() << std::endl; - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "\n" + << OCIO::ImageIO::GetVersion() << "\n" + << "OCIO Version: " << OCIO::GetVersion() << "\n"; if (!useLut) { - std::cout << std::endl; - std::cout << "OCIO Config. file: '" << inputconfig << "'" << std::endl; - std::cout << "OCIO Config. version: " << config->getMajorVersion() << "." - << config->getMinorVersion() << std::endl; - std::cout << "OCIO search_path: " << config->getSearchPath() << std::endl; + std::cout << "\nOCIO Config. file: '" << inputconfig << "'\n" + "OCIO Config. version: " << config->getMajorVersion() << "." + << config->getMinorVersion() << "\n" + "OCIO search_path: " << config->getSearchPath() << "\n"; } } if (usegpuLegacy) { - std::cout << std::endl; - std::cout << "Using legacy OCIO v1 GPU color processing." << std::endl; + std::cout << "\nUsing legacy OCIO v1 GPU color processing.\n"; } else if (usegpu) { - std::cout << std::endl; - std::cout << "Using GPU color processing." << std::endl; + std::cout << "\nUsing GPU color processing.\n"; } OCIO::ImageIO imgInput; @@ -333,8 +329,7 @@ int main(int argc, const char **argv) OCIO::ImageIO *imgOutput = &imgInput; // Load the image. - std::cout << std::endl; - std::cout << "Loading " << inputimage << std::endl; + std::cout << "\nLoading " << inputimage << "\n"; try { if (usegpu || usegpuLegacy) @@ -346,16 +341,16 @@ int main(int argc, const char **argv) imgInput.read(inputimage); } - std::cout << imgInput.getImageDescStr() << std::endl; + std::cout << imgInput.getImageDescStr() << "\n"; } catch (const std::exception & e) { - std::cerr << "ERROR: Loading file failed: " << e.what() << std::endl; + std::cerr << "ERROR: Loading file failed: " << e.what() << "\n"; exit(1); } catch (...) { - std::cerr << "ERROR: Loading file failed." << std::endl; + std::cerr << "ERROR: Loading file failed.\n"; exit(1); } @@ -377,7 +372,7 @@ int main(int argc, const char **argv) else { std::cerr << "Cannot convert image with " << imgInput.getNumChannels() - << " components." << std::endl; + << " components.\n"; exit(1); } @@ -387,7 +382,7 @@ int main(int argc, const char **argv) } catch (const OCIO::Exception & e) { - std::cerr << std::endl << e.what() << std::endl; + std::cerr << "\n" << e.what() << "\n"; exit(1); } @@ -447,7 +442,7 @@ int main(int argc, const char **argv) } else { - std::cout << "ERROR: Could not get NamedTransform " << namedtransform << std::endl; + std::cout << "ERROR: Could not get NamedTransform " << namedtransform << "\n"; exit(1); } } @@ -461,7 +456,7 @@ int main(int argc, const char **argv) } else { - std::cout << "ERROR: Could not get NamedTransform " << namedtransform << std::endl; + std::cout << "ERROR: Could not get NamedTransform " << namedtransform << "\n"; exit(1); } } @@ -472,12 +467,12 @@ int main(int argc, const char **argv) } catch (const OCIO::Exception & e) { - std::cout << "ERROR: OCIO failed with: " << e.what() << std::endl; + std::cout << "ERROR: OCIO failed with: " << e.what() << "\n"; exit(1); } catch (...) { - std::cout << "ERROR: Creating processor unknown failure." << std::endl; + std::cout << "ERROR: Creating processor unknown failure.\n"; exit(1); } @@ -575,21 +570,18 @@ int main(int argc, const char **argv) std::chrono::duration duration = end - start; - std::cout << std::endl; - std::cout << "CPU processing took: " - << duration.count() - << " ms" << std::endl; + std::cout << "\nCPU processing took: " << duration.count() << " ms\n"; } } } catch (const OCIO::Exception & exception) { - std::cerr << "ERROR: OCIO failed with: " << exception.what() << std::endl; + std::cerr << "ERROR: OCIO failed with: " << exception.what() << "\n"; exit(1); } catch (...) { - std::cerr << "ERROR: Unknown error processing the image." << std::endl; + std::cerr << "ERROR: Unknown error processing the image.\n"; exit(1); } @@ -604,7 +596,7 @@ int main(int argc, const char **argv) !StringToFloat(&fval,value.c_str())) { std::cerr << "ERROR: Attribute string '" << floatAttrs[i] - << "' should be in the form name=floatvalue." << std::endl; + << "' should be in the form name=floatvalue.\n"; parseError = true; continue; } @@ -620,7 +612,7 @@ int main(int argc, const char **argv) !StringToInt(&ival,value.c_str())) { std::cerr << "ERROR: Attribute string '" << intAttrs[i] - << "' should be in the form name=intvalue." << std::endl; + << "' should be in the form name=intvalue.\n"; parseError = true; continue; } @@ -634,7 +626,7 @@ int main(int argc, const char **argv) if (!ParseNameValuePair(name, value, stringAttrs[i])) { std::cerr << "ERROR: Attribute string '" << stringAttrs[i] - << "' should be in the form name=value." << std::endl; + << "' should be in the form name=value.\n"; parseError = true; continue; } @@ -672,12 +664,12 @@ int main(int argc, const char **argv) } catch (...) { - std::cerr << "ERROR: Writing file \"" << outputimage << "\"." << std::endl; + std::cerr << "ERROR: Writing file \"" << outputimage << "\".\n"; exit(1); } - std::cout << "Wrote " << outputimage << std::endl; - std::cout << imgOutput->getImageDescStr() << std::endl; + std::cout << "Wrote " << outputimage << "\n"; + std::cout << imgOutput->getImageDescStr() << "\n"; return 0; } diff --git a/src/apps/ociocpuinfo/main.cpp b/src/apps/ociocpuinfo/main.cpp index ef5104e23c..7ca16817da 100644 --- a/src/apps/ociocpuinfo/main.cpp +++ b/src/apps/ociocpuinfo/main.cpp @@ -11,22 +11,22 @@ int main() { const OCIO::CPUInfo& cpu = OCIO::CPUInfo::instance(); - std::cout << "name : " << cpu.getName() << std::endl; - std::cout << "vendor : " << cpu.getVendor() << std::endl; - std::cout << "hasSSE2 : " << cpu.hasSSE2() << std::endl; - std::cout << "SSE2Slow : " << cpu.SSE2Slow() << std::endl; - std::cout << "hasSSE3 : " << cpu.hasSSE3() << std::endl; - std::cout << "SSE3Slow : " << cpu.SSE3Slow() << std::endl; - std::cout << "hasSSSE3 : " << cpu.hasSSSE3() << std::endl; - std::cout << "SSSE3Slow : " << cpu.SSSE3Slow() << std::endl; - std::cout << "hasSSE4 : " << cpu.hasSSE4() << std::endl; - std::cout << "hasSSE42 : " << cpu.hasSSE42() << std::endl; - std::cout << "hasAVX : " << cpu.hasAVX() << std::endl; - std::cout << "AVXSlow : " << cpu.AVXSlow() << std::endl; - std::cout << "hasAVX2 : " << cpu.hasAVX2() << std::endl; - std::cout << "AVX2SlowGather : " << cpu.AVX2SlowGather() << std::endl; - std::cout << "hasAVX512 : " << cpu.hasAVX512() << std::endl; - std::cout << "hasF16C : " << cpu.hasF16C() << std::endl; + std::cout << "name : " << cpu.getName() << "\n"; + std::cout << "vendor : " << cpu.getVendor() << "\n"; + std::cout << "hasSSE2 : " << cpu.hasSSE2() << "\n"; + std::cout << "SSE2Slow : " << cpu.SSE2Slow() << "\n"; + std::cout << "hasSSE3 : " << cpu.hasSSE3() << "\n"; + std::cout << "SSE3Slow : " << cpu.SSE3Slow() << "\n"; + std::cout << "hasSSSE3 : " << cpu.hasSSSE3() << "\n"; + std::cout << "SSSE3Slow : " << cpu.SSSE3Slow() << "\n"; + std::cout << "hasSSE4 : " << cpu.hasSSE4() << "\n"; + std::cout << "hasSSE42 : " << cpu.hasSSE42() << "\n"; + std::cout << "hasAVX : " << cpu.hasAVX() << "\n"; + std::cout << "AVXSlow : " << cpu.AVXSlow() << "\n"; + std::cout << "hasAVX2 : " << cpu.hasAVX2() << "\n"; + std::cout << "AVX2SlowGather : " << cpu.AVX2SlowGather() << "\n"; + std::cout << "hasAVX512 : " << cpu.hasAVX512() << "\n"; + std::cout << "hasF16C : " << cpu.hasF16C() << "\n"; return 0; } \ No newline at end of file diff --git a/src/apps/ociodisplay/main.cpp b/src/apps/ociodisplay/main.cpp index ed7f09759a..3d6bc7e8e6 100644 --- a/src/apps/ociodisplay/main.cpp +++ b/src/apps/ociodisplay/main.cpp @@ -7,11 +7,10 @@ #include #include #include -#include #include -#include #include -#include +#include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -74,7 +73,7 @@ static void InitImageTexture(const char * filename) if (filename && *filename) { - std::cout << "Loading: " << filename << std::endl; + std::cout << "Loading: " << filename << "\n" << std::flush; try { @@ -82,19 +81,19 @@ static void InitImageTexture(const char * filename) } catch (const std::exception &e) { - std::cerr << "ERROR: Loading file failed: " << e.what() << std::endl; + std::cerr << "ERROR: Loading file failed: " << e.what() << "\n"; exit(1); } catch (...) { - std::cerr << "ERROR: Loading file failed." << std::endl; + std::cerr << "ERROR: Loading file failed.\n"; exit(1); } } // If no file is provided, use a default gradient texture else { - std::cout << "No image specified, loading gradient." << std::endl; + std::cout << "No image specified, loading gradient.\n"; img.init(512, 512, OCIO::CHANNEL_ORDERING_RGBA, OCIO::BIT_DEPTH_F32); @@ -127,7 +126,7 @@ static void InitImageTexture(const char * filename) else { std::cerr << "Cannot load image with " << img.getNumChannels() - << " components." << std::endl; + << " components.\n"; exit(1); } @@ -160,13 +159,12 @@ void InitOCIO(const char * filename) if (!cs.empty()) { g_inputColorSpace = cs; - std::cout << "colorspace: " << cs << std::endl; + std::cout << "colorspace: " << cs << "\n"; } else { std::cout << "colorspace: " << g_inputColorSpace - << " \t(could not determine from filename, using default)" - << std::endl; + << " \t(could not determine from filename, using default)\n"; } } } @@ -324,27 +322,26 @@ void UpdateOCIOGLState() if (g_verbose) { - std::cout << std::endl; - std::cout << "Color transformation composed of:" << std::endl; - std::cout << " Image ColorSpace is:\t" << g_inputColorSpace << std::endl; - std::cout << " Views is:\t\t" << g_transformName << std::endl; - std::cout << " Display is:\t\t" << g_display << std::endl; - std::cout << " Looks Override is:\t'" << g_look << "'" << std::endl; - std::cout << " with:" << std::endl; - std::cout << " exposure_fstop = " << g_exposure_fstop << std::endl; - std::cout << " display_gamma = " << g_display_gamma << std::endl; - std::cout << " channels = " - << (g_channelHot[0] ? "R" : "") - << (g_channelHot[1] ? "G" : "") - << (g_channelHot[2] ? "B" : "") - << (g_channelHot[3] ? "A" : "") << std::endl; + std::cout << "\n" + "Color transformation composed of:\n" + " Image ColorSpace is:\t" << g_inputColorSpace << "\n" + " Views is:\t\t\t" << g_transformName << "\n" + " Display is:\t\t" << g_display << "\n" + " Looks Override is:\t'" << g_look << "'\n" + " with:\n" + " exposure_fstop = " << g_exposure_fstop << "\n" + " display_gamma = " << g_display_gamma << "\n" + " channels = " + << (g_channelHot[0] ? "R" : "") + << (g_channelHot[1] ? "G" : "") + << (g_channelHot[2] ? "B" : "") + << (g_channelHot[3] ? "A" : "") << "\n"; for (const auto &opt : OptmizationMenu) { if (opt.second == g_optimization) { - std::cout << std::endl - << "Optimization: " << opt.first << std::endl; + std::cout << "\nOptimization: " << opt.first << "\n"; } } } @@ -392,7 +389,7 @@ void UpdateOCIOGLState() } catch (const OCIO::Exception &e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; return; } catch (...) @@ -622,19 +619,19 @@ void parseArguments(int argc, char **argv) #endif else if (0 == strcmp(argv[i], "-h")) { - std::cout << std::endl; - std::cout << "help:" << std::endl; - std::cout << " ociodisplay [OPTIONS] [image] where" << std::endl; - std::cout << std::endl; - std::cout << " OPTIONS:" << std::endl; - std::cout << " -h : displays the help and exit" << std::endl; - std::cout << " -v : displays the color space information" << std::endl; - std::cout << " -gpulegacy : use the legacy (i.e. baked) GPU color processing" << std::endl; - std::cout << " -gpuinfo : output the OCIO shader program" << std::endl; + std::cout << "\n" + "help:\n" + " ociodisplay [OPTIONS] [image] where\n" + "\n" + " OPTIONS:\n" + " -h : displays the help and exit\n" + " -v : displays the color space information\n" + " -gpulegacy : use the legacy (i.e. baked) GPU color processing\n" + " -gpuinfo : output the OCIO shader program\n" #if __APPLE__ - std::cout << " -metal : use metal OCIO shader backend " << std::endl; + " -metal : use metal OCIO shader backend \n" #endif - std::cout << std::endl; + "\n"; exit(0); } else @@ -663,7 +660,7 @@ int main(int argc, char **argv) } catch (const OCIO::Exception &e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; return 1; } @@ -684,12 +681,11 @@ int main(int argc, char **argv) { if (!g_filename.empty()) { - std::cout << std::endl; - std::cout << "Image: " << g_filename << std::endl; + std::cout << "\nImage: " << g_filename << "\n"; } - std::cout << std::endl; - std::cout << OCIO::ImageIO::GetVersion() << std::endl; - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "\n"; + std::cout << OCIO::ImageIO::GetVersion() << "\n"; + std::cout << "OCIO Version: " << OCIO::GetVersion() << "\n"; } OCIO::ConstConfigRcPtr config; @@ -710,16 +706,16 @@ int main(int argc, char **argv) if (env && *env) { - std::cout << std::endl; - std::cout << "OCIO Config. file : '" << env << "'" << std::endl; + std::cout << "\n"; + std::cout << "OCIO Config. file : '" << env << "'\n"; std::cout << "OCIO Config. version: " << config->getMajorVersion() << "." - << config->getMinorVersion() << std::endl; - std::cout << "OCIO search_path : " << config->getSearchPath() << std::endl; + << config->getMinorVersion() << "\n"; + std::cout << "OCIO search_path : " << config->getSearchPath() << "\n"; } } - std::cout << std::endl; - std::cout << USAGE_TEXT << std::endl; + std::cout << "\n"; + std::cout << USAGE_TEXT << "\n"; InitImageTexture(g_filename.c_str()); try @@ -728,7 +724,7 @@ int main(int argc, char **argv) } catch (OCIO::Exception &e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; exit(1); } @@ -740,7 +736,7 @@ int main(int argc, char **argv) } catch (const OCIO::Exception &e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << "\n"; exit(1); } diff --git a/src/apps/ociolutimage/main.cpp b/src/apps/ociolutimage/main.cpp index c34831ce43..c6b6acd336 100644 --- a/src/apps/ociolutimage/main.cpp +++ b/src/apps/ociolutimage/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -165,7 +166,7 @@ int main(int argc, const char* argv[]) if (ap.parse(argc, argv) < 0) { - std::cout << ap.geterror() << std::endl; + std::cout << ap.geterror() << "\n"; ap.usage(); std::cout << "\n"; return 1; @@ -191,7 +192,7 @@ int main(int argc, const char* argv[]) } catch (const std::exception & e) { - std::cerr << "Error generating image: " << e.what() << std::endl; + std::cerr << "Error generating image: " << e.what() << "\n"; exit(1); } catch (...) @@ -211,7 +212,7 @@ int main(int argc, const char* argv[]) } catch (const std::exception & e) { - std::cerr << "Error extracting LUT: " << e.what() << std::endl; + std::cerr << "Error extracting LUT: " << e.what() << "\n"; exit(1); } catch (...) diff --git a/src/apps/ociomakeclf/main.cpp b/src/apps/ociomakeclf/main.cpp index b79c771328..30a50242d7 100644 --- a/src/apps/ociomakeclf/main.cpp +++ b/src/apps/ociomakeclf/main.cpp @@ -2,10 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include #include #include -#include +#include +#include +#include +#include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -71,8 +75,7 @@ void CreateOutputLutFile(const std::string & outLutFilepath, OCIO::ConstGroupTra std::ostringstream oss; oss << "Could not open the file '" << outLutFilepath - << "'." - << std::endl; + << "'.\n"; throw OCIO::Exception(oss.str().c_str()); } } @@ -100,7 +103,7 @@ int main(int argc, const char ** argv) if (ap.parse(argc, argv) < 0) { - std::cerr << std::endl << ap.geterror() << std::endl << std::endl; + std::cerr << "\n" << ap.geterror() << "\n\n"; ap.usage(); return 1; } @@ -126,17 +129,17 @@ int main(int argc, const char ** argv) if (StringUtils::EndsWith(cscName, BuiltinSuffix)) { cscName.resize(cscName.size() - strlen(BuiltinSuffix)); - std::cout << std::endl << "\t" << cscName; + std::cout << "\n\t" << cscName; } } - std::cout << std::endl << std::endl; + std::cout << "\n\n"; return 0; } if (args.size() != 2) { - std::cerr << "ERROR: Expecting 2 arguments, found " << args.size() << "." << std::endl; + std::cerr << "ERROR: Expecting 2 arguments, found " << args.size() << ".\n"; ap.usage(); return 1; } @@ -168,15 +171,14 @@ int main(int argc, const char ** argv) { std::cerr << "ERROR: The LUT color space name '" << originalCSC - << "' is not supported." - << std::endl; + << "' is not supported.\n"; return 1; } } if (outLutFilepath.empty()) { - std::cerr << "ERROR: The output file path is missing." << std::endl; + std::cerr << "ERROR: The output file path is missing.\n"; return 1; } else @@ -186,22 +188,21 @@ int main(int argc, const char ** argv) { std::cerr << "ERROR: The output LUT file path '" << outLutFilepath - << "' must have a .clf extension." - << std::endl; + << "' must have a .clf extension.\n"; return 1; } } if (verbose) { - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "OCIO Version: " << OCIO::GetVersion() << "\n"; } try { if (verbose) { - std::cout << "Building the transformation." << std::endl; + std::cout << "Building the transformation.\n"; } OCIO::GroupTransformRcPtr grp = OCIO::GroupTransform::Create(); @@ -257,7 +258,7 @@ int main(int argc, const char ** argv) if (verbose && !measure) { - std::cout << Msg << "." << std::endl; + std::cout << Msg << ".\n"; } if (measure) @@ -276,17 +277,17 @@ int main(int argc, const char ** argv) } catch (OCIO::Exception & ex) { - std::cerr << "OCIO ERROR: " << ex.what() << std::endl; + std::cerr << "OCIO ERROR: " << ex.what() << "\n"; return 1; } catch (std::exception & ex) { - std::cerr << "ERROR: " << ex.what() << std::endl; + std::cerr << "ERROR: " << ex.what() << "\n"; return 1; } catch (...) { - std::cerr << "ERROR: Unknown error encountered." << std::endl; + std::cerr << "ERROR: Unknown error encountered.\n"; return 1; } diff --git a/src/apps/ociomergeconfigs/main.cpp b/src/apps/ociomergeconfigs/main.cpp index 7069e15f98..123718eed4 100644 --- a/src/apps/ociomergeconfigs/main.cpp +++ b/src/apps/ociomergeconfigs/main.cpp @@ -4,11 +4,13 @@ #include #include #include +#include +#include +#include #include #include -#include "utils/StringUtils.h" namespace OCIO = OCIO_NAMESPACE; @@ -105,13 +107,13 @@ int main(int argc, const char **argv) if (ap.parse(argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); exit(1); } else if (args.size() != 1) { - std::cerr << "ERROR: Expecting 1 arguments, found " << args.size() << "." << std::endl; + std::cerr << "ERROR: Expecting 1 arguments, found " << args.size() << ".\n"; ap.usage(); exit(1); } @@ -132,7 +134,7 @@ int main(int argc, const char **argv) } catch (OCIO::Exception & e) { - std::cout << e.what() << std::endl; + std::cout << e.what() << "\n"; exit(1); } @@ -148,20 +150,19 @@ int main(int argc, const char **argv) } catch (OCIO::Exception & exception) { - std::cout << exception.what() << std::endl; + std::cout << exception.what() << "\n"; exit(1); } } if (displayParams) { - std::cout << "********************" << std::endl; - std::cout << "Merger options" << std::endl; - std::cout << "********************" << std::endl; + std::cout << "********************\n" + "Merger options\n" + "********************\n"; std::ostringstream os; newMerger->serialize(os); - std::cout << os.str() << std::endl; - std::cout << std::endl; + std::cout << os.str() << "\n\n"; } // "Show-all" option take priority over the "show" option. @@ -169,23 +170,23 @@ int main(int argc, const char **argv) { for (int i = 0; i < merger->getNumConfigMergingParameters(); i++) { - std::cout << "*********************" << std::endl; - std::cout << "Merged Config " << i << std::endl; - std::cout << "*********************" << std::endl; + std::cout << "*********************\n" + "Merged Config " << i << "\n" + "*********************\n"; std::ostringstream os; newMerger->getMergedConfig(i)->serialize(os); - std::cout << os.str() << std::endl; + std::cout << os.str() << "\n"; } } if (displayConfig && !displayAllConfig) { - std::cout << "********************" << std::endl; - std::cout << "Last Merged Config" << std::endl; - std::cout << "********************" << std::endl; + std::cout << "********************\n" + "Last Merged Config\n" + "********************\n"; std::ostringstream os; newMerger->getMergedConfig()->serialize(os); - std::cout << os.str() << std::endl; + std::cout << os.str() << "\n"; } if (!outputFile.empty()) diff --git a/src/apps/ocioperf/main.cpp b/src/apps/ocioperf/main.cpp index 4c7837494f..b836e40cb0 100644 --- a/src/apps/ocioperf/main.cpp +++ b/src/apps/ocioperf/main.cpp @@ -5,12 +5,13 @@ #include #include "apputils/argparse.h" -#include "utils/StringUtils.h" #include -#include -#include #include +#include +#include +#include +#include namespace OCIO = OCIO_NAMESPACE; @@ -62,7 +63,7 @@ class CustomMeasure oss << "] ms"; - std::cout << oss.str() << std::endl; + std::cout << oss.str() << "\n"; } } @@ -196,8 +197,8 @@ int main(int argc, const char **argv) "--verbose", &verbose, "Display some general information", "--test %d", &testType, - "Define the type of processing to measure: "\ - "0 means on the complete image (the default), 1 is line-by-line, "\ + "Define the type of processing to measure: " + "0 means on the complete image (the default), 1 is line-by-line, " "2 is pixel-per-pixel and -1 performs all the test types", "--transform %s", &transformFile, "Provide the transform file to apply on the image", @@ -222,7 +223,7 @@ int main(int argc, const char **argv) if (ap.parse (argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); return 1; } @@ -235,18 +236,15 @@ int main(int argc, const char **argv) if (verbose) { - std::cout << std::endl; - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "\nOCIO Version: " << OCIO::GetVersion() << "\n"; } if (!transformFile.empty()) { - std::cout << std::endl; - std::cout << "Processing using '" << transformFile << "'" << std::endl << std::endl; + std::cout << "\nProcessing using '" << transformFile << "'\n\n"; } - std::cout << std::endl << std::endl; - std::cout << "Processing statistics:" << std::endl << std::endl; + std::cout << "\n\nProcessing statistics:\n\n" << std::flush; // Process the image. try @@ -284,14 +282,12 @@ int main(int argc, const char **argv) { if(!inputconfig.empty()) { - std::cout << std::endl; - std::cout << "Loading " << inputconfig << std::endl; + std::cout << "\nLoading " << inputconfig << "\n" << std::flush; srcConfig = OCIO::Config::CreateFromFile(inputconfig.c_str()); } else if(OCIO::GetEnvVariable("OCIO")) { - std::cout << std::endl; - std::cout << "Loading $OCIO " << OCIO::GetEnvVariable("OCIO") << std::endl; + std::cout << "\nLoading $OCIO " << OCIO::GetEnvVariable("OCIO") << "\n" << std::flush; srcConfig = OCIO::Config::CreateFromEnv(); } else @@ -301,16 +297,14 @@ int main(int argc, const char **argv) if (verbose) { - std::cout << std::endl; - std::cout << "OCIO Config. version: " << srcConfig->getMajorVersion() << "." - << srcConfig->getMinorVersion() << std::endl; - std::cout << "OCIO search_path: " << srcConfig->getSearchPath() << std::endl; - std::cout << std::endl; + std::cout << "\nOCIO Config. version: " << srcConfig->getMajorVersion() << "." + << srcConfig->getMinorVersion() << "\n"; + std::cout << "OCIO search_path: " << srcConfig->getSearchPath() << "\n\n"; const std::string inputStr = !inColorSpace.empty() ? inColorSpace : "(" + display + ", " + view + ")"; const std::string outputStr = !outColorSpace.empty() ? outColorSpace : "(" + display + ", " + view + ")"; std::cout << "Processing from '" << inputStr << "' to '" - << outputStr << "'" << std::endl; + << outputStr << "'\n" << std::flush; } OCIO::ConfigRcPtr config = srcConfig->createEditableCopy(); @@ -511,8 +505,7 @@ int main(int argc, const char **argv) } } - std::cout << std::endl << std::endl; - std::cout << "Image processing statistics:" << std::endl << std::endl; + std::cout << "\n\nImage processing statistics:\n\n" << std::flush; // Create an arbitrary 4K RGBA image. @@ -700,22 +693,22 @@ int main(int argc, const char **argv) } } - std::cout << std::endl << std::endl; + std::cout << "\n\n"; } catch (OCIO::Exception & ex) { - std::cerr << "OCIO ERROR: " << ex.what() << std::endl; + std::cerr << "OCIO ERROR: " << ex.what() << "\n"; return 1; } catch (std::exception & ex) { - std::cerr << "ERROR: " << ex.what() << std::endl; + std::cerr << "ERROR: " << ex.what() << "\n"; return 1; } catch (...) { - std::cerr << "ERROR: Unknown error encountered." << std::endl; + std::cerr << "ERROR: Unknown error encountered.\n"; return 1; } diff --git a/src/apps/ociowrite/main.cpp b/src/apps/ociowrite/main.cpp index 7af352d2b0..b5bb5f8efa 100644 --- a/src/apps/ociowrite/main.cpp +++ b/src/apps/ociowrite/main.cpp @@ -6,9 +6,7 @@ #include #include #include -#include #include -#include #include namespace OCIO = OCIO_NAMESPACE; @@ -65,7 +63,7 @@ int main(int argc, const char **argv) if (argc <= 1 || ap.parse(argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); exit(1); } @@ -78,17 +76,15 @@ int main(int argc, const char **argv) if (verbose) { - std::cout << std::endl; - std::cout << "OCIO Version: " << OCIO::GetVersion() << std::endl; + std::cout << "\nOCIO Version: " << OCIO::GetVersion() << "\n"; const char * env = OCIO::GetEnvVariable("OCIO"); if (env && *env) { try { - std::cout << std::endl; - std::cout << "OCIO Configuration: '" << env << "'" << std::endl; + std::cout << "\nOCIO Configuration: '" << env << "'\n"; OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); - std::cout << "OCIO search_path: " << config->getSearchPath() << std::endl; + std::cout << "OCIO search_path: " << config->getSearchPath() << "\n"; } catch(...) { @@ -100,8 +96,7 @@ int main(int argc, const char **argv) if (filepath.empty()) { - std::cerr << std::endl; - std::cerr << "The output transform filepath is missing." << std::endl; + std::cerr << "\nThe output transform filepath is missing.\n"; exit(1); } @@ -124,18 +119,16 @@ int main(int argc, const char **argv) if (transformFileFormat.empty()) { - std::cerr << std::endl; - std::cerr << "Could not find a valid format from the extension of: '"; - std::cerr << filepath << "'. " << formats.str() << std::endl; + std::cerr << "\nCould not find a valid format from the extension of: '"; + std::cerr << filepath << "'. " << formats.str() << "\n"; exit(1); } else if (verbose) { - std::cout << std::endl; - std::cout << "File format being used: " << transformFileFormat << std::endl; + std::cout << "\nFile format being used: " << transformFileFormat << "\n"; } - std::cout << std::endl; + std::cout << "\n"; // Process transform. try @@ -152,18 +145,14 @@ int main(int argc, const char **argv) { if (verbose) { - std::cout << std::endl; std::string inputStr = !inputColorSpace.empty() ? inputColorSpace : "(" + display + ", " + view + ")"; std::string outputStr = !outputColorSpace.empty() ? outputColorSpace : "(" + display + ", " + view + ")"; - std::cout << "Processing from '" - << inputStr << "' to '" - << outputStr << "'" << std::endl; + std::cout << "\nProcessing from '" << inputStr << "' to '" << outputStr << "'\n"; } } else { - std::cerr << std::endl; - std::cerr << "Missing the ${OCIO} env. variable." << std::endl; + std::cerr << "\nMissing the ${OCIO} env. variable.\n"; exit(1); } @@ -171,15 +160,14 @@ int main(int argc, const char **argv) if (verbose) { - std::cout << std::endl; - std::cout << "Config: " << config->getDescription() + std::cout << "\nConfig: " << config->getDescription() << " - version: " << config->getMajorVersion(); const auto minor = config->getMinorVersion(); if (minor) { std::cout << "." << minor; } - std::cout << std::endl; + std::cout << "\n"; } // --colorspaces @@ -195,8 +183,7 @@ int main(int argc, const char **argv) (useDisplayview && !useColorspaces && !useInvertview) || (useInvertview && !useColorspaces && !useDisplayview))) { - std::cerr << std::endl; - std::cerr << "Any combinations of --colorspaces, --view or --invertview is invalid." << std::endl; + std::cerr << "\nAny combinations of --colorspaces, --view or --invertview is invalid.\n"; exit(1); } @@ -212,8 +199,7 @@ int main(int argc, const char **argv) } else { - std::cerr << std::endl; - std::cerr << "Missing output color spaces for --colorspaces." << std::endl; + std::cerr << "\nMissing output color spaces for --colorspaces.\n"; exit(1); } } @@ -232,8 +218,7 @@ int main(int argc, const char **argv) } else { - std::cerr << std::endl; - std::cerr << "Missing output (display,view) pair for --view." << std::endl; + std::cerr << "\nMissing output (display,view) pair for --view.\n"; exit(1); } } @@ -252,8 +237,7 @@ int main(int argc, const char **argv) } else { - std::cerr << std::endl; - std::cerr << "Missing output colorspaces for --invertview." << std::endl; + std::cerr << "\nMissing output colorspaces for --invertview.\n"; exit(1); } } @@ -267,26 +251,24 @@ int main(int argc, const char **argv) } else { - std::cerr << std::endl; - std::cerr << "Could not open file: " << filepath << std::endl; + std::cerr << "\nCould not open file: " << filepath << "\n"; exit(1); } } else { - std::cerr << std::endl; - std::cerr << "Colorspaces or (display,view) pair must be specified as source." << std::endl; + std::cerr << "\nColorspaces or (display,view) pair must be specified as source.\n"; exit(1); } } catch(OCIO::Exception & exception) { - std::cerr << "OCIO Error: " << exception.what() << std::endl; + std::cerr << "OCIO Error: " << exception.what() << "\n"; exit(1); } catch(...) { - std::cerr << "Unknown OCIO error encountered." << std::endl; + std::cerr << "Unknown OCIO error encountered.\n"; exit(1); } diff --git a/src/apputils/argparse.cpp b/src/apputils/argparse.cpp index d3dfd542a9..4312c6aed9 100644 --- a/src/apputils/argparse.cpp +++ b/src/apputils/argparse.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "strutil.h" diff --git a/src/apputils/argparse.h b/src/apputils/argparse.h index 2bf03a43c6..864ec6af1b 100644 --- a/src/apputils/argparse.h +++ b/src/apputils/argparse.h @@ -90,7 +90,7 @@ class ArgOption; // Forward declaration /// NULL); /// /// if (ap.parse (argc, argv) < 0) { -/// std::cerr << ap.geterror() << std::endl; +/// std::cerr << ap.geterror() << "\n"; /// ap.usage (); /// return EXIT_FAILURE; /// } diff --git a/src/apputils/measure.h b/src/apputils/measure.h index 3273a4935f..a200b4f801 100644 --- a/src/apputils/measure.h +++ b/src/apputils/measure.h @@ -74,7 +74,7 @@ class Measure << m_explanations << "\n" << " Processing took: " << (m_duration.count() / float(m_iterations)) - << " ms" << std::endl; + << " ms\n" << std::flush; } private: diff --git a/src/apputils/strutil.cpp b/src/apputils/strutil.cpp index 747596f2ec..3854ab4920 100644 --- a/src/apputils/strutil.cpp +++ b/src/apputils/strutil.cpp @@ -33,8 +33,6 @@ #include #include #include -#include -#include #include "strutil.h" diff --git a/src/apputils/strutil.h b/src/apputils/strutil.h index bb6fd87600..ce60e67dc4 100644 --- a/src/apputils/strutil.h +++ b/src/apputils/strutil.h @@ -42,8 +42,6 @@ #include #include -#include -#include #ifndef OPENCOLORIO_PRINTF_ARGS diff --git a/src/bindings/java/JNIColorSpace.cpp b/src/bindings/java/JNIColorSpace.cpp index 423da186cc..69e2fc4719 100644 --- a/src/bindings/java/JNIColorSpace.cpp +++ b/src/bindings/java/JNIColorSpace.cpp @@ -1,10 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include - #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" #include "JNIUtil.h" diff --git a/src/bindings/java/JNIConfig.cpp b/src/bindings/java/JNIConfig.cpp index b474974bfc..8b40ee4213 100644 --- a/src/bindings/java/JNIConfig.cpp +++ b/src/bindings/java/JNIConfig.cpp @@ -3,7 +3,6 @@ #include #include -#include #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" diff --git a/src/bindings/java/JNIContext.cpp b/src/bindings/java/JNIContext.cpp index 9d2d255276..4093b1ea0a 100644 --- a/src/bindings/java/JNIContext.cpp +++ b/src/bindings/java/JNIContext.cpp @@ -2,7 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" diff --git a/src/bindings/java/JNIGpuShaderDesc.cpp b/src/bindings/java/JNIGpuShaderDesc.cpp index 3ceedf3be1..2f151b3408 100644 --- a/src/bindings/java/JNIGpuShaderDesc.cpp +++ b/src/bindings/java/JNIGpuShaderDesc.cpp @@ -2,7 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" diff --git a/src/bindings/java/JNILook.cpp b/src/bindings/java/JNILook.cpp index fc76c6692e..2016360c9f 100644 --- a/src/bindings/java/JNILook.cpp +++ b/src/bindings/java/JNILook.cpp @@ -1,10 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include - #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" #include "JNIUtil.h" diff --git a/src/bindings/java/JNIProcessor.cpp b/src/bindings/java/JNIProcessor.cpp index 1e6b456da5..eec7ab57e1 100644 --- a/src/bindings/java/JNIProcessor.cpp +++ b/src/bindings/java/JNIProcessor.cpp @@ -1,9 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include #include "OpenColorIO/OpenColorIO.h" #include "OpenColorIOJNI.h" diff --git a/src/bindings/java/JNIUtil.cpp b/src/bindings/java/JNIUtil.cpp index eae5fbe2a2..ab78359852 100644 --- a/src/bindings/java/JNIUtil.cpp +++ b/src/bindings/java/JNIUtil.cpp @@ -1,10 +1,14 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include #include "JNIUtil.h" + namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyBuiltinConfigRegistry.cpp b/src/bindings/python/PyBuiltinConfigRegistry.cpp index 615dfbb93b..27435e5a6a 100644 --- a/src/bindings/python/PyBuiltinConfigRegistry.cpp +++ b/src/bindings/python/PyBuiltinConfigRegistry.cpp @@ -3,6 +3,7 @@ #include "PyBuiltinConfigRegistry.h" #include "PyUtils.h" +#include "utils/StringUtils.h" namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyBuiltinTransformRegistry.cpp b/src/bindings/python/PyBuiltinTransformRegistry.cpp index c1fc3bad5d..fb90b123f8 100644 --- a/src/bindings/python/PyBuiltinTransformRegistry.cpp +++ b/src/bindings/python/PyBuiltinTransformRegistry.cpp @@ -1,8 +1,11 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include "PyBuiltinTransformRegistry.h" #include "PyUtils.h" +#include "utils/StringUtils.h" namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyCPUProcessor.cpp b/src/bindings/python/PyCPUProcessor.cpp index e5786ba244..e6ce5015c1 100644 --- a/src/bindings/python/PyCPUProcessor.cpp +++ b/src/bindings/python/PyCPUProcessor.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include "PyDynamicProperty.h" diff --git a/src/bindings/python/PyConfig.cpp b/src/bindings/python/PyConfig.cpp index 6e7971844f..f9dc9cf929 100644 --- a/src/bindings/python/PyConfig.cpp +++ b/src/bindings/python/PyConfig.cpp @@ -6,6 +6,7 @@ #include "PyOpenColorIO.h" #include "PyUtils.h" +#include "utils/StringUtils.h" namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyConfigIOProxy.cpp b/src/bindings/python/PyConfigIOProxy.cpp index 2c9aac83fd..70384187fe 100644 --- a/src/bindings/python/PyConfigIOProxy.cpp +++ b/src/bindings/python/PyConfigIOProxy.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include #include #include "PyOpenColorIO.h" diff --git a/src/bindings/python/PyContext.cpp b/src/bindings/python/PyContext.cpp index 1456ef35a7..89d33cd530 100644 --- a/src/bindings/python/PyContext.cpp +++ b/src/bindings/python/PyContext.cpp @@ -5,6 +5,7 @@ #include "PyOpenColorIO.h" #include "PyUtils.h" +#include "utils/StringUtils.h" namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyFormatMetadata.cpp b/src/bindings/python/PyFormatMetadata.cpp index af82122d28..ccb59f840d 100644 --- a/src/bindings/python/PyFormatMetadata.cpp +++ b/src/bindings/python/PyFormatMetadata.cpp @@ -5,6 +5,7 @@ #include "PyOpenColorIO.h" #include "PyUtils.h" +#include "utils/StringUtils.h" #include diff --git a/src/bindings/python/PyGradingData.cpp b/src/bindings/python/PyGradingData.cpp index a1a093d7b3..eb2ecb82df 100644 --- a/src/bindings/python/PyGradingData.cpp +++ b/src/bindings/python/PyGradingData.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include "PyOpenColorIO.h" #include "PyUtils.h" diff --git a/src/bindings/python/PyImageDesc.cpp b/src/bindings/python/PyImageDesc.cpp index ff762b1ffd..a30d915d50 100644 --- a/src/bindings/python/PyImageDesc.cpp +++ b/src/bindings/python/PyImageDesc.cpp @@ -1,8 +1,11 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include "PyImageDesc.h" + namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/PyNamedTransform.cpp b/src/bindings/python/PyNamedTransform.cpp index 10205a88f2..9d3b709675 100644 --- a/src/bindings/python/PyNamedTransform.cpp +++ b/src/bindings/python/PyNamedTransform.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include "PyOpenColorIO.h" #include "PyUtils.h" diff --git a/src/bindings/python/PyOpenColorIO.h b/src/bindings/python/PyOpenColorIO.h index 54848057a3..9e67ceb261 100644 --- a/src/bindings/python/PyOpenColorIO.h +++ b/src/bindings/python/PyOpenColorIO.h @@ -12,8 +12,6 @@ #include -#include "utils/StringUtils.h" - // Generated at build time: '${PROJECT_BINARY_DIR}/docs/_doxygen/docstrings.h' #include "docstrings.h" diff --git a/src/bindings/python/PyProcessorMetadata.cpp b/src/bindings/python/PyProcessorMetadata.cpp index 736790f2da..55977f760f 100644 --- a/src/bindings/python/PyProcessorMetadata.cpp +++ b/src/bindings/python/PyProcessorMetadata.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include "PyOpenColorIO.h" #include "PyUtils.h" diff --git a/src/bindings/python/PyUtils.cpp b/src/bindings/python/PyUtils.cpp index fbf1afc31e..82fd2062a1 100644 --- a/src/bindings/python/PyUtils.cpp +++ b/src/bindings/python/PyUtils.cpp @@ -2,7 +2,11 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include +#include +#include +#include #include "PyUtils.h" diff --git a/src/bindings/python/PyUtils.h b/src/bindings/python/PyUtils.h index 8e0ca44ef5..81508894a2 100644 --- a/src/bindings/python/PyUtils.h +++ b/src/bindings/python/PyUtils.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "PyOpenColorIO.h" diff --git a/src/bindings/python/apphelpers/PyMergeConfigs.cpp b/src/bindings/python/apphelpers/PyMergeConfigs.cpp index d5104bf55a..a75d1adf28 100644 --- a/src/bindings/python/apphelpers/PyMergeConfigs.cpp +++ b/src/bindings/python/apphelpers/PyMergeConfigs.cpp @@ -1,9 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include "PyOpenColorIO.h" #include "PyUtils.h" + namespace OCIO_NAMESPACE { diff --git a/src/bindings/python/apphelpers/PyMixingHelpers.cpp b/src/bindings/python/apphelpers/PyMixingHelpers.cpp index 5711b11820..94203c3f4b 100644 --- a/src/bindings/python/apphelpers/PyMixingHelpers.cpp +++ b/src/bindings/python/apphelpers/PyMixingHelpers.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include "PyOpenColorIO.h" #include "PyUtils.h" diff --git a/src/bindings/python/transforms/PyLogCameraTransform.cpp b/src/bindings/python/transforms/PyLogCameraTransform.cpp index e70de5a474..55ff63a829 100644 --- a/src/bindings/python/transforms/PyLogCameraTransform.cpp +++ b/src/bindings/python/transforms/PyLogCameraTransform.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include "PyTransform.h" namespace OCIO_NAMESPACE diff --git a/src/bindings/python/transforms/PyLut3DTransform.cpp b/src/bindings/python/transforms/PyLut3DTransform.cpp index bf5d282d82..2d91f7f055 100644 --- a/src/bindings/python/transforms/PyLut3DTransform.cpp +++ b/src/bindings/python/transforms/PyLut3DTransform.cpp @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - #include "PyTransform.h" namespace OCIO_NAMESPACE diff --git a/src/libutils/imageioapphelpers/imageio_exr.cpp b/src/libutils/imageioapphelpers/imageio_exr.cpp index a53f9c745c..ad0b06431f 100644 --- a/src/libutils/imageioapphelpers/imageio_exr.cpp +++ b/src/libutils/imageioapphelpers/imageio_exr.cpp @@ -90,8 +90,7 @@ class ImageIO::Impl { std::ostringstream ss; - ss << std::endl; - ss << "Image: [" << getWidth() << "x" << getHeight() << "] " + ss << "\nImage: [" << getWidth() << "x" << getHeight() << "] " << BitDepthToString(getBitDepth()) << " "; const std::vector chanNames = getChannelNames(); @@ -111,7 +110,7 @@ class ImageIO::Impl ss << ", "; } } - ss << std::endl; + ss << "\n"; return ss.str(); } diff --git a/src/libutils/imageioapphelpers/imageio_oiio.cpp b/src/libutils/imageioapphelpers/imageio_oiio.cpp index 9505af6ee6..6cee1c8ca5 100644 --- a/src/libutils/imageioapphelpers/imageio_oiio.cpp +++ b/src/libutils/imageioapphelpers/imageio_oiio.cpp @@ -92,8 +92,7 @@ class ImageIO::Impl { std::ostringstream ss; - ss << std::endl; - ss << "Image: [" << getWidth() << "x" << getHeight() << "] " + ss << "\nImage: [" << getWidth() << "x" << getHeight() << "] " << BitDepthToString(getBitDepth()) << " "; const std::vector chanNames = getChannelNames(); @@ -113,7 +112,7 @@ class ImageIO::Impl ss << ", "; } } - ss << std::endl; + ss << "\n"; return ss.str(); } diff --git a/src/libutils/oglapphelpers/glsl.cpp b/src/libutils/oglapphelpers/glsl.cpp index 791648e66e..bacbd487c7 100644 --- a/src/libutils/oglapphelpers/glsl.cpp +++ b/src/libutils/oglapphelpers/glsl.cpp @@ -18,6 +18,7 @@ #endif +#include #include #include @@ -491,9 +492,9 @@ unsigned OpenGLBuilder::buildProgram(const std::string & clientShaderProgram, bo } std::ostringstream oss; - oss << getGLSLVersionString() << std::endl - << (!standaloneShader ? m_shaderDesc->getShaderText() : "") << std::endl - << clientShaderProgram << std::endl; + oss << getGLSLVersionString() << "\n" + << (!standaloneShader ? m_shaderDesc->getShaderText() : "") << "\n" + << clientShaderProgram << "\n"; if(m_verbose) { diff --git a/src/libutils/oglapphelpers/metalapp.h b/src/libutils/oglapphelpers/metalapp.h index 37fba14018..f312da59c2 100644 --- a/src/libutils/oglapphelpers/metalapp.h +++ b/src/libutils/oglapphelpers/metalapp.h @@ -5,6 +5,7 @@ #ifndef INCLUDED_OCIO_METALAPP_H #define INCLUDED_OCIO_METALAPP_H +#include #include diff --git a/src/libutils/oglapphelpers/metalapp.mm b/src/libutils/oglapphelpers/metalapp.mm index be46d4e1b6..44c8d5adfc 100644 --- a/src/libutils/oglapphelpers/metalapp.mm +++ b/src/libutils/oglapphelpers/metalapp.mm @@ -96,15 +96,15 @@ std::ostringstream main; - main << std::endl - << "uniform sampler2DRect img;" << std::endl - << std::endl - << "void main()" << std::endl - << "{" << std::endl - << " gl_FragColor = texture2DRect(img, gl_TexCoord[0].st * " - << "vec2(" << m_outputImage->getWidth() << ", " << m_outputImage->getHeight() << "));" - << std::endl - << "}" << std::endl; + main << "\n" + "uniform sampler2DRect img;\n" + "\n" + "void main()\n" + "{\n" + " gl_FragColor = texture2DRect(img, gl_TexCoord[0].st * " + "vec2(" << m_outputImage->getWidth() << ", " << m_outputImage->getHeight() << "));" + "\n" + "}\n"; glActiveTexture(GL_TEXTURE0); @@ -339,7 +339,7 @@ vertex VertexOut ColorCorrectionVS(unsigned int vId [[ vertex_id ]]) << shaderDesc->getFunctionName() << "(" << params.str() << uniformParams.str() << separator << "inPixel);\n" << "}\n"; - main << std::endl; + main << "\n"; } else { @@ -348,11 +348,8 @@ vertex VertexOut ColorCorrectionVS(unsigned int vId [[ vertex_id ]]) if(printShader()) { - std::cout << std::endl; - std::cout << "GPU Shader Program:" << std::endl; - std::cout << std::endl; - std::cout << main.str() << std::endl; - std::cout << std::endl; + std::cout << "\nGPU Shader Program:\n\n"; + std::cout << main.str() << "\n\n"; } // Build the fragment shader program. diff --git a/src/libutils/oglapphelpers/oglapp.cpp b/src/libutils/oglapphelpers/oglapp.cpp index 32528a55cc..d868e4c46b 100644 --- a/src/libutils/oglapphelpers/oglapp.cpp +++ b/src/libutils/oglapphelpers/oglapp.cpp @@ -205,14 +205,14 @@ void OglApp::setShader(GpuShaderDescRcPtr & shaderDesc) m_oglBuilder->allocateAllTextures(1); std::ostringstream main; - main << std::endl - << "uniform sampler2D img;" << std::endl - << std::endl - << "void main()" << std::endl - << "{" << std::endl - << " vec4 col = texture2D(img, gl_TexCoord[0].st);" << std::endl - << " gl_FragColor = " << shaderDesc->getFunctionName() << "(col);" << std::endl - << "}" << std::endl; + main << "\n" + "uniform sampler2D img;\n" + "\n" + "void main()\n" + "{\n" + " vec4 col = texture2D(img, gl_TexCoord[0].st);\n" + " gl_FragColor = " << shaderDesc->getFunctionName() << "(col);\n" + "}\n"; // Build the fragment shader program. m_oglBuilder->buildProgram(main.str().c_str(), false); @@ -229,11 +229,11 @@ void OglApp::setShader(GpuShaderDescRcPtr & shaderDesc) void OglApp::printGLInfo() const noexcept { - std::cout << std::endl - << "GL Vendor: " << glGetString(GL_VENDOR) << std::endl - << "GL Renderer: " << glGetString(GL_RENDERER) << std::endl - << "GL Version: " << glGetString(GL_VERSION) << std::endl - << "GLSL Version: " << glGetString(GL_SHADING_LANGUAGE_VERSION) << std::endl; + std::cout << "\n" + << "GL Vendor: " << glGetString(GL_VENDOR) << "\n" + << "GL Renderer: " << glGetString(GL_RENDERER) << "\n" + << "GL Version: " << glGetString(GL_VERSION) << "\n" + << "GLSL Version: " << glGetString(GL_SHADING_LANGUAGE_VERSION) << "\n"; } void OglApp::setupCommon() @@ -374,9 +374,9 @@ void HeadlessApp::printGLInfo() const noexcept void HeadlessApp::printEGLInfo() const noexcept { - std::cout << std::endl - << "EGL Vendor: " << eglQueryString(m_eglDisplay, EGL_VENDOR) << std::endl - << "EGL Version: " << eglQueryString(m_eglDisplay, EGL_VERSION) << std::endl; + std::cout << "\n" + << "EGL Vendor: " << eglQueryString(m_eglDisplay, EGL_VENDOR) << "\n" + << "EGL Version: " << eglQueryString(m_eglDisplay, EGL_VERSION) << "\n"; } void HeadlessApp::redisplay() diff --git a/src/libutils/oglapphelpers/oglapp.h b/src/libutils/oglapphelpers/oglapp.h index 34b2f7d071..0db286f9b7 100644 --- a/src/libutils/oglapphelpers/oglapp.h +++ b/src/libutils/oglapphelpers/oglapp.h @@ -176,6 +176,7 @@ class ScreenApp: public OglApp #ifdef OCIO_HEADLESS_ENABLED +#include #include class HeadlessApp: public OglApp diff --git a/src/utils/StringUtils.h b/src/utils/StringUtils.h index 7dbfaa1a4b..e608e92116 100644 --- a/src/utils/StringUtils.h +++ b/src/utils/StringUtils.h @@ -5,7 +5,7 @@ #define INCLUDED_STRINGUTILS_H #include -#include +#include #include #include #include diff --git a/tests/cpu/AVX2_tests.cpp b/tests/cpu/AVX2_tests.cpp index 1d8373fc90..304ffb0462 100644 --- a/tests/cpu/AVX2_tests.cpp +++ b/tests/cpu/AVX2_tests.cpp @@ -6,6 +6,7 @@ #if OCIO_USE_AVX2 #include +#include #include diff --git a/tests/cpu/AVX512_tests.cpp b/tests/cpu/AVX512_tests.cpp index 8b8e6f9cd7..70152a3709 100644 --- a/tests/cpu/AVX512_tests.cpp +++ b/tests/cpu/AVX512_tests.cpp @@ -6,6 +6,7 @@ #if OCIO_USE_AVX512 #include +#include #include diff --git a/tests/cpu/AVX_tests.cpp b/tests/cpu/AVX_tests.cpp index a88b52a8a1..11b5021f04 100644 --- a/tests/cpu/AVX_tests.cpp +++ b/tests/cpu/AVX_tests.cpp @@ -5,10 +5,15 @@ #include "CPUInfo.h" #if OCIO_USE_AVX +#include #include +#include +#include #include +#include + #include #include "MathUtils.h" #include "BitDepthUtils.h" diff --git a/tests/cpu/Baker_tests.cpp b/tests/cpu/Baker_tests.cpp index db68bb7e4e..0d0aeea29b 100644 --- a/tests/cpu/Baker_tests.cpp +++ b/tests/cpu/Baker_tests.cpp @@ -2,11 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include + #include "Baker.cpp" #include "testutils/UnitTest.h" #include "ParseUtils.h" -#include "UnitTestUtils.h" #include "utils/StringUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/CPUProcessor_tests.cpp b/tests/cpu/CPUProcessor_tests.cpp index 925a75397c..77a67599d7 100644 --- a/tests/cpu/CPUProcessor_tests.cpp +++ b/tests/cpu/CPUProcessor_tests.cpp @@ -2,11 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include + #include "CPUProcessor.cpp" -#include "ops/lut1d/Lut1DOp.h" -#include "ops/lut1d/Lut1DOpData.h" -#include "ScanlineHelper.h" #include "testutils/UnitTest.h" #include "UnitTestUtils.h" diff --git a/tests/cpu/Caching_tests.cpp b/tests/cpu/Caching_tests.cpp index 94f93ba238..18865420a5 100644 --- a/tests/cpu/Caching_tests.cpp +++ b/tests/cpu/Caching_tests.cpp @@ -2,10 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "Caching.cpp" #include "testutils/UnitTest.h" #include "UnitTestUtils.h" +#include "Platform.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ColorSpace_tests.cpp b/tests/cpu/ColorSpace_tests.cpp index 09819632e6..bc66601e6a 100644 --- a/tests/cpu/ColorSpace_tests.cpp +++ b/tests/cpu/ColorSpace_tests.cpp @@ -4,8 +4,6 @@ #include -#include - #include "ColorSpace.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ConfigUtils_tests.cpp b/tests/cpu/ConfigUtils_tests.cpp index db58c3f62b..70f370dad8 100644 --- a/tests/cpu/ConfigUtils_tests.cpp +++ b/tests/cpu/ConfigUtils_tests.cpp @@ -1,13 +1,12 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include - -#include "UnitTestUtils.h" +#include +#include +#include #include "ConfigUtils.h" #include "testutils/UnitTest.h" -#include "UnitTestLogUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/Config_tests.cpp b/tests/cpu/Config_tests.cpp index b3d69c1688..0fe0c48d5d 100644 --- a/tests/cpu/Config_tests.cpp +++ b/tests/cpu/Config_tests.cpp @@ -3,6 +3,11 @@ #include +#include +#include +#include +#include +#include #include @@ -410,7 +415,7 @@ OCIO_ADD_TEST(Config, required_roles_for_version_2_2) OCIO_CHECK_ASSERT( StringUtils::Contain( svec, - "[OpenColorIO Error]: The scene_linear role is required for a config version 2.2 or"\ + "[OpenColorIO Error]: The scene_linear role is required for a config version 2.2 or" " higher.") ); @@ -3425,7 +3430,7 @@ OCIO_ADD_TEST(Config, display) OCIO_CHECK_NO_THROW(config = OCIO::Config::CreateFromStream(is)); OCIO_CHECK_THROW_WHAT(config->validate(), OCIO::Exception, - "The content of the env. variable for the list of active displays"\ + "The content of the env. variable for the list of active displays" " [sRGB_2, sRGB_1, ABCDEF] contains invalid display name(s)."); } @@ -3473,7 +3478,7 @@ OCIO_ADD_TEST(Config, display) OCIO_CHECK_NO_THROW(config = OCIO::Config::CreateFromStream(is)); OCIO_CHECK_THROW_WHAT(config->validate(), OCIO::Exception, - "The list of active displays [sRGB_2, sRGB_1, ABCDEF] "\ + "The list of active displays [sRGB_2, sRGB_1, ABCDEF] " "from the config file contains invalid display name(s)"); } } @@ -5633,12 +5638,12 @@ OCIO_ADD_TEST(Config, matrix_serialization) " from_reference: !\n" " children:\n" // Check the value serialization. - " - ! {matrix: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],"\ + " - ! {matrix: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]," " offset: [-1, -2, -3, -4]}\n" // Check the value precision. " - ! {offset: [0.123456789876, 1.23456789876, 12.3456789876, 123.456789876]}\n" - " - ! {matrix: [0.123456789876, 1.23456789876, 12.3456789876, 123.456789876, "\ - "1234.56789876, 12345.6789876, 123456.789876, 1234567.89876, "\ + " - ! {matrix: [0.123456789876, 1.23456789876, 12.3456789876, 123.456789876, " + "1234.56789876, 12345.6789876, 123456.789876, 1234567.89876, " "0, 0, 1, 0, 0, 0, 0, 1]}\n"; const std::string str = PROFILE_V1 + SIMPLE_PROFILE_A + SIMPLE_PROFILE_B_V1 + strEnd; @@ -5895,7 +5900,7 @@ OCIO_ADD_TEST(Config, remove_color_space) // As discussed only validation traps the issue. OCIO_CHECK_THROW_WHAT(config->validate(), OCIO::Exception, - "Config failed role validation. The role 'default' refers to"\ + "Config failed role validation. The role 'default' refers to" " a color space, 'raw', which is not defined."); } @@ -9954,8 +9959,8 @@ OCIO_ADD_TEST(Config, create_from_archive) OCIO_CHECK_THROW_WHAT( OCIO::Config::CreateFromFile(archivePath.c_str()), OCIO::Exception, - "Loading the OCIO profile failed. At line 0, '' parsing failed: The specified OCIO "\ - "configuration file from Archive/ConfigIOProxy does not appear to have a valid version"\ + "Loading the OCIO profile failed. At line 0, '' parsing failed: The specified OCIO " + "configuration file from Archive/ConfigIOProxy does not appear to have a valid version" " " ); } @@ -9976,8 +9981,8 @@ OCIO_ADD_TEST(Config, create_from_archive) OCIO_CHECK_THROW_WHAT( OCIO::Config::CreateFromFile(archivePath.c_str()), OCIO::Exception, - "Loading the OCIO profile failed. At line 0, '' parsing failed: The specified OCIO "\ - "configuration file from Archive/ConfigIOProxy does not appear to have a valid version"\ + "Loading the OCIO profile failed. At line 0, '' parsing failed: The specified OCIO " + "configuration file from Archive/ConfigIOProxy does not appear to have a valid version" " " ); } @@ -10011,16 +10016,16 @@ OCIO_ADD_TEST(Config, create_from_archive) OCIO_CHECK_THROW_WHAT( config->getProcessor("plain_lut11_cs", "shot1_lut11_cs"), OCIO::Exception, - "The specified file reference 'lut11.clf' could not be located. The following "\ - "attempts were made: 'shot4\\lut11.clf' : 'shot1\\lut11.clf' : 'shot2\\lut11.clf' : "\ + "The specified file reference 'lut11.clf' could not be located. The following " + "attempts were made: 'shot4\\lut11.clf' : 'shot1\\lut11.clf' : 'shot2\\lut11.clf' : " "'shot3\\lut11.clf' : 'shot3\\subdir\\lut11.clf' : '.\\lut11.clf'." ); #else OCIO_CHECK_THROW_WHAT( config->getProcessor("plain_lut11_cs", "shot1_lut11_cs"), OCIO::Exception, - "The specified file reference 'lut11.clf' could not be located. The following "\ - "attempts were made: 'shot4/lut11.clf' : 'shot1/lut11.clf' : 'shot2/lut11.clf' : "\ + "The specified file reference 'lut11.clf' could not be located. The following " + "attempts were made: 'shot4/lut11.clf' : 'shot1/lut11.clf' : 'shot2/lut11.clf' : " "'shot3/lut11.clf' : 'shot3/subdir/lut11.clf' : './lut11.clf'." ); #endif diff --git a/tests/cpu/Context_tests.cpp b/tests/cpu/Context_tests.cpp index 3372d8f36f..417ffc1818 100644 --- a/tests/cpu/Context_tests.cpp +++ b/tests/cpu/Context_tests.cpp @@ -2,14 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include #include "Context.cpp" -#include "PathUtils.h" -#include "Platform.h" #include "testutils/UnitTest.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/Display_tests.cpp b/tests/cpu/Display_tests.cpp index f2646aec6f..1732db19c9 100644 --- a/tests/cpu/Display_tests.cpp +++ b/tests/cpu/Display_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "Display.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/DynamicProperty_tests.cpp b/tests/cpu/DynamicProperty_tests.cpp index ce00daed79..7a9e4d4880 100644 --- a/tests/cpu/DynamicProperty_tests.cpp +++ b/tests/cpu/DynamicProperty_tests.cpp @@ -2,8 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. -#include - #include "DynamicProperty.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/Exception_tests.cpp b/tests/cpu/Exception_tests.cpp index e75c8d1d10..77087b7cbc 100644 --- a/tests/cpu/Exception_tests.cpp +++ b/tests/cpu/Exception_tests.cpp @@ -2,7 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include "Exception.cpp" diff --git a/tests/cpu/FileRules_tests.cpp b/tests/cpu/FileRules_tests.cpp index 141c05efd1..89af5b0ef8 100644 --- a/tests/cpu/FileRules_tests.cpp +++ b/tests/cpu/FileRules_tests.cpp @@ -2,7 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include +#include #include "FileRules.cpp" @@ -1585,7 +1587,7 @@ strictparsing: true cfg->upgradeToLatestVersion(); OCIO_CHECK_EQUAL( - std::string("[OpenColorIO Warning]: The default rule creation falls back to the"\ + std::string("[OpenColorIO Warning]: The default rule creation falls back to the" " first color space because no suitable color space exists.\n"), l.output()); } @@ -1798,7 +1800,7 @@ OCIO_ADD_TEST(FileRules, config_v1_to_v2_from_memory) OCIO_CHECK_ASSERT( StringUtils::Contain( svec, - "[OpenColorIO Warning]: The default rule creation falls back to the"\ + "[OpenColorIO Warning]: The default rule creation falls back to the" " first color space because no suitable color space exists." ) ); @@ -1862,7 +1864,7 @@ constexpr char CONFIG[] = { R"(ocio_profile_version: 2 OCIO_CHECK_THROW_WHAT( cfg->validate(), OCIO::Exception, - "Config failed role validation. The role 'default' refers to a color space, 'cs2', "\ + "Config failed role validation. The role 'default' refers to a color space, 'cs2', " "which is not defined." ); } @@ -1897,7 +1899,7 @@ constexpr char CONFIG[] = { R"(ocio_profile_version: 2 OCIO_CHECK_THROW_WHAT( cfg->validate(), OCIO::Exception, - "File rules: rule named 'Default' is referencing 'cs2' that is neither "\ + "File rules: rule named 'Default' is referencing 'cs2' that is neither " "a color space nor a named transform." ); } diff --git a/tests/cpu/GpuShader_tests.cpp b/tests/cpu/GpuShader_tests.cpp index eb2bc09dc8..742dd6cff9 100644 --- a/tests/cpu/GpuShader_tests.cpp +++ b/tests/cpu/GpuShader_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "GpuShader.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/Logging_tests.cpp b/tests/cpu/Logging_tests.cpp index eed87f44e5..cfbbf69b8e 100644 --- a/tests/cpu/Logging_tests.cpp +++ b/tests/cpu/Logging_tests.cpp @@ -113,8 +113,8 @@ OCIO_ADD_TEST(Logging, message_function) OCIO::SetLoggingLevel(OCIO::LOGGING_LEVEL_DEBUG); OCIO::LogDebug(std::string("My first msg\nMy second msg\nMy third msg")); - OCIO_CHECK_EQUAL(guard.output(), "[OpenColorIO Debug]: My first msg\n"\ - "[OpenColorIO Debug]: My second msg\n"\ + OCIO_CHECK_EQUAL(guard.output(), "[OpenColorIO Debug]: My first msg\n" + "[OpenColorIO Debug]: My second msg\n" "[OpenColorIO Debug]: My third msg\n"); } } diff --git a/tests/cpu/MathUtils_tests.cpp b/tests/cpu/MathUtils_tests.cpp index fda8c82b50..a6dfd1b1e6 100644 --- a/tests/cpu/MathUtils_tests.cpp +++ b/tests/cpu/MathUtils_tests.cpp @@ -3,6 +3,7 @@ #include +#include #include "MathUtils.cpp" diff --git a/tests/cpu/NamedTransform_tests.cpp b/tests/cpu/NamedTransform_tests.cpp index 5a05cae41d..5ffb62c0b0 100644 --- a/tests/cpu/NamedTransform_tests.cpp +++ b/tests/cpu/NamedTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "NamedTransform.cpp" #include "Platform.h" diff --git a/tests/cpu/OCIOZArchive_tests.cpp b/tests/cpu/OCIOZArchive_tests.cpp index bc1d2c497a..2b46d9ffe4 100644 --- a/tests/cpu/OCIOZArchive_tests.cpp +++ b/tests/cpu/OCIOZArchive_tests.cpp @@ -1,9 +1,17 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include +#include + #include "OpenColorIO/OpenColorIO.h" #include "testutils/UnitTest.h" #include "UnitTestUtils.h" +#include "Platform.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/OpOptimizers_tests.cpp b/tests/cpu/OpOptimizers_tests.cpp index bffb1b6ad1..bb53005d07 100644 --- a/tests/cpu/OpOptimizers_tests.cpp +++ b/tests/cpu/OpOptimizers_tests.cpp @@ -2,6 +2,10 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include + #include "OpOptimizers.cpp" #include "ops/cdl/CDLOp.h" @@ -13,7 +17,6 @@ #include "ops/matrix/MatrixOp.h" #include "ops/range/RangeOp.h" #include "testutils/UnitTest.h" -#include "transforms/FileTransform.h" #include "UnitTestUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/Op_tests.cpp b/tests/cpu/Op_tests.cpp index d6c1fb3c00..79724a3ec5 100644 --- a/tests/cpu/Op_tests.cpp +++ b/tests/cpu/Op_tests.cpp @@ -2,11 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "Op.cpp" #include "ops/noop/NoOps.h" #include "testutils/UnitTest.h" -#include "UnitTestUtils.h" +#include "ops/matrix/MatrixOp.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ParseUtils_tests.cpp b/tests/cpu/ParseUtils_tests.cpp index 246fc92fcf..e4899fc484 100644 --- a/tests/cpu/ParseUtils_tests.cpp +++ b/tests/cpu/ParseUtils_tests.cpp @@ -2,6 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "ParseUtils.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/PathUtils_tests.cpp b/tests/cpu/PathUtils_tests.cpp index d7d2b34321..d67f30881e 100644 --- a/tests/cpu/PathUtils_tests.cpp +++ b/tests/cpu/PathUtils_tests.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include "PathUtils.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/SSE2_tests.cpp b/tests/cpu/SSE2_tests.cpp index b7d2961cf5..8a6dd0e282 100644 --- a/tests/cpu/SSE2_tests.cpp +++ b/tests/cpu/SSE2_tests.cpp @@ -6,6 +6,7 @@ #if OCIO_USE_SSE2 #include +#include #include diff --git a/tests/cpu/SSE_tests.cpp b/tests/cpu/SSE_tests.cpp index a08e25f69c..ab6a28bea0 100644 --- a/tests/cpu/SSE_tests.cpp +++ b/tests/cpu/SSE_tests.cpp @@ -4,7 +4,10 @@ #if OCIO_USE_SSE2 +#include #include +#include +#include #include diff --git a/tests/cpu/UnitTestLogUtils.cpp b/tests/cpu/UnitTestLogUtils.cpp index f55dbc11d3..cc79b49f79 100644 --- a/tests/cpu/UnitTestLogUtils.cpp +++ b/tests/cpu/UnitTestLogUtils.cpp @@ -7,8 +7,6 @@ #include #include -#include "Platform.h" -#include "testutils/UnitTest.h" #include "UnitTestLogUtils.h" namespace OCIO_NAMESPACE @@ -117,29 +115,29 @@ MuteLogging::~MuteLogging() bool checkAndMuteSceneLinearRoleError(LogGuard & logGuard) { - const std::string interchange_scene = "[OpenColorIO Error]: The scene_linear role is "\ + const std::string interchange_scene = "[OpenColorIO Error]: The scene_linear role is " "required for a config version 2.2 or higher."; return logGuard.findAndRemove(interchange_scene); } bool checkAndMuteCompositingLogRoleError(LogGuard & logGuard) { - const std::string compositing_log = "[OpenColorIO Error]: The compositing_log role is "\ + const std::string compositing_log = "[OpenColorIO Error]: The compositing_log role is " "required for a config version 2.2 or higher."; return logGuard.findAndRemove(compositing_log); } bool checkAndMuteColorTimingRoleError(LogGuard & logGuard) { - const std::string color_timing = "[OpenColorIO Error]: The color_timing role is required "\ + const std::string color_timing = "[OpenColorIO Error]: The color_timing role is required " "for a config version 2.2 or higher."; return logGuard.findAndRemove(color_timing); } bool checkAndMuteAcesInterchangeRoleError(LogGuard & logGuard) { - const std::string aces_interchange = "[OpenColorIO Error]: The aces_interchange role is "\ - "required when there are scene-referred color spaces and "\ + const std::string aces_interchange = "[OpenColorIO Error]: The aces_interchange role is " + "required when there are scene-referred color spaces and " "the config version is 2.2 or higher."; return logGuard.findAndRemove(aces_interchange); } diff --git a/tests/cpu/UnitTestMain.cpp b/tests/cpu/UnitTestMain.cpp index 6986d72262..f18d8d45bb 100644 --- a/tests/cpu/UnitTestMain.cpp +++ b/tests/cpu/UnitTestMain.cpp @@ -7,7 +7,12 @@ #include #endif -#include +#include +#include +#include +#include +#include +#include #include "testutils/UnitTest.h" #include "apputils/argparse.h" @@ -90,7 +95,7 @@ int main(int argc, const char ** argv) if (ap.parse(argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); return 1; } @@ -187,7 +192,7 @@ int main(int argc, const char ** argv) if (results.size() >= 3) { - std::cerr << "Invalid value for the argument '--run_only'." << std::endl; + std::cerr << "Invalid value for the argument '--run_only'.\n"; ap.usage(); return 1; } @@ -236,12 +241,12 @@ int main(int argc, const char ** argv) } catch(std::exception & ex) { - std::cerr << "\nFAILED: " << ex.what() << "." << std::endl; + std::cerr << "\nFAILED: " << ex.what() << ".\n"; ++unit_test_failures; } catch(...) { - std::cerr << "\nFAILED: Unexpected error." << std::endl; + std::cerr << "\nFAILED: Unexpected error.\n"; ++unit_test_failures; } @@ -265,7 +270,7 @@ int main(int argc, const char ** argv) << std::left << std::setw(maxCharToDisplay+1) << name << "] - " << (passing ? skipped ? "SKIPPED" : "PASSED" : "FAILED") - << std::endl; + << "\n"; if (stopOnFirstError && !passing) { diff --git a/tests/cpu/UnitTestOptimFlags.cpp b/tests/cpu/UnitTestOptimFlags.cpp index b1ec6b99e4..2f3d572e34 100644 --- a/tests/cpu/UnitTestOptimFlags.cpp +++ b/tests/cpu/UnitTestOptimFlags.cpp @@ -6,8 +6,6 @@ #include "UnitTestOptimFlags.h" -#include "Platform.h" - namespace OCIO = OCIO_NAMESPACE; OCIOOptimizationFlagsEnvGuard::OCIOOptimizationFlagsEnvGuard(const char * newValue) diff --git a/tests/cpu/UnitTestUtils.cpp b/tests/cpu/UnitTestUtils.cpp index e09b7f5ec0..db3b4a5a65 100644 --- a/tests/cpu/UnitTestUtils.cpp +++ b/tests/cpu/UnitTestUtils.cpp @@ -2,9 +2,11 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include -#include "Logging.h" #include "OpBuilders.h" #include "UnitTestUtils.h" #include "utils/StringUtils.h" diff --git a/tests/cpu/ViewingRules_tests.cpp b/tests/cpu/ViewingRules_tests.cpp index a58ffaf63f..4a798bd5f0 100644 --- a/tests/cpu/ViewingRules_tests.cpp +++ b/tests/cpu/ViewingRules_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ViewingRules.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/apphelpers/CategoryHelpers_tests.cpp b/tests/cpu/apphelpers/CategoryHelpers_tests.cpp index a65f79e510..3d0fd0eace 100644 --- a/tests/cpu/apphelpers/CategoryHelpers_tests.cpp +++ b/tests/cpu/apphelpers/CategoryHelpers_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "apphelpers/CategoryHelpers.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/apphelpers/ColorSpaceHelpers_tests.cpp b/tests/cpu/apphelpers/ColorSpaceHelpers_tests.cpp index 1ac402b402..2126259802 100644 --- a/tests/cpu/apphelpers/ColorSpaceHelpers_tests.cpp +++ b/tests/cpu/apphelpers/ColorSpaceHelpers_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "apphelpers/ColorSpaceHelpers.cpp" #include "testutils/UnitTest.h" #include "UnitTestLogUtils.h" diff --git a/tests/cpu/apphelpers/DisplayViewHelpers_tests.cpp b/tests/cpu/apphelpers/DisplayViewHelpers_tests.cpp index 2ee1ca258c..46e1190030 100644 --- a/tests/cpu/apphelpers/DisplayViewHelpers_tests.cpp +++ b/tests/cpu/apphelpers/DisplayViewHelpers_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "apphelpers/DisplayViewHelpers.cpp" #include "testutils/UnitTest.h" #include "UnitTestLogUtils.h" diff --git a/tests/cpu/apphelpers/LegacyViewingPipeline_tests.cpp b/tests/cpu/apphelpers/LegacyViewingPipeline_tests.cpp index 1c41d9dd9c..11a187694b 100644 --- a/tests/cpu/apphelpers/LegacyViewingPipeline_tests.cpp +++ b/tests/cpu/apphelpers/LegacyViewingPipeline_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "apphelpers/LegacyViewingPipeline.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/apphelpers/MergeConfigsHelpers_tests.cpp b/tests/cpu/apphelpers/MergeConfigsHelpers_tests.cpp index 26dd83acc0..d6acd4a539 100644 --- a/tests/cpu/apphelpers/MergeConfigsHelpers_tests.cpp +++ b/tests/cpu/apphelpers/MergeConfigsHelpers_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include +#include #include "apphelpers/mergeconfigs/MergeConfigsHelpers.cpp" diff --git a/tests/cpu/apphelpers/MixingHelpers_tests.cpp b/tests/cpu/apphelpers/MixingHelpers_tests.cpp index eda330b5cd..5e69d47929 100644 --- a/tests/cpu/apphelpers/MixingHelpers_tests.cpp +++ b/tests/cpu/apphelpers/MixingHelpers_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "apphelpers/MixingHelpers.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/builtinconfigs/BuiltinConfig_tests.cpp b/tests/cpu/builtinconfigs/BuiltinConfig_tests.cpp index c58c3edd24..1c5649b2cd 100644 --- a/tests/cpu/builtinconfigs/BuiltinConfig_tests.cpp +++ b/tests/cpu/builtinconfigs/BuiltinConfig_tests.cpp @@ -31,7 +31,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - CG Config [COLORSPACES v1.0.0] "\ + std::string("Academy Color Encoding System - CG Config [COLORSPACES v1.0.0] " "[ACES v1.3] [OCIO v2.1]") ); @@ -60,7 +60,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - CG Config [COLORSPACES v2.0.0] "\ + std::string("Academy Color Encoding System - CG Config [COLORSPACES v2.0.0] " "[ACES v1.3] [OCIO v2.3]") ); @@ -89,7 +89,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - CG Config [COLORSPACES v2.2.0] "\ + std::string("Academy Color Encoding System - CG Config [COLORSPACES v2.2.0] " "[ACES v1.3] [OCIO v2.4]") ); @@ -118,7 +118,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - CG Config [COLORSPACES v4.0.0] "\ + std::string("Academy Color Encoding System - CG Config [COLORSPACES v4.0.0] " "[ACES v2.0] [OCIO v2.5]") ); @@ -147,7 +147,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - Studio Config [COLORSPACES v1.0.0] "\ + std::string("Academy Color Encoding System - Studio Config [COLORSPACES v1.0.0] " "[ACES v1.3] [OCIO v2.1]") ); @@ -176,7 +176,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - Studio Config [COLORSPACES v2.0.0] "\ + std::string("Academy Color Encoding System - Studio Config [COLORSPACES v2.0.0] " "[ACES v1.3] [OCIO v2.3]") ); @@ -205,7 +205,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - Studio Config [COLORSPACES v2.2.0] "\ + std::string("Academy Color Encoding System - Studio Config [COLORSPACES v2.2.0] " "[ACES v1.3] [OCIO v2.4]") ); @@ -234,7 +234,7 @@ OCIO_ADD_TEST(BuiltinConfigs, basic) OCIO_CHECK_EQUAL( std::string(registry.getBuiltinConfigUIName(cfgidx)), - std::string("Academy Color Encoding System - Studio Config [COLORSPACES v4.0.0] "\ + std::string("Academy Color Encoding System - Studio Config [COLORSPACES v4.0.0] " "[ACES v2.0] [OCIO v2.5]") ); diff --git a/tests/cpu/fileformats/FileFormat3DL_tests.cpp b/tests/cpu/fileformats/FileFormat3DL_tests.cpp index e237694f93..408f08f8d8 100644 --- a/tests/cpu/fileformats/FileFormat3DL_tests.cpp +++ b/tests/cpu/fileformats/FileFormat3DL_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormat3DL.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatCCC_tests.cpp b/tests/cpu/fileformats/FileFormatCCC_tests.cpp index 74c19e57ca..81f3468fbf 100644 --- a/tests/cpu/fileformats/FileFormatCCC_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCCC_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatCCC.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatCC_tests.cpp b/tests/cpu/fileformats/FileFormatCC_tests.cpp index 4b31455778..b3d79b0d6e 100644 --- a/tests/cpu/fileformats/FileFormatCC_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCC_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatCC.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatCDL_tests.cpp b/tests/cpu/fileformats/FileFormatCDL_tests.cpp index cdd4a840b2..bcf3d33e89 100644 --- a/tests/cpu/fileformats/FileFormatCDL_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCDL_tests.cpp @@ -27,6 +27,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include "fileformats/FileFormatCDL.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatCSP_tests.cpp b/tests/cpu/fileformats/FileFormatCSP_tests.cpp index 00541c7749..1dee552be0 100644 --- a/tests/cpu/fileformats/FileFormatCSP_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCSP_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatCSP.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatCTF_tests.cpp b/tests/cpu/fileformats/FileFormatCTF_tests.cpp index 4dc12578a0..1c759e43b1 100644 --- a/tests/cpu/fileformats/FileFormatCTF_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCTF_tests.cpp @@ -2,11 +2,16 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include + #include "BitDepthUtils.h" #include "fileformats/FileFormatCTF.cpp" #include "ops/fixedfunction/FixedFunctionOp.h" #include "ops/gradingrgbcurve/GradingRGBCurve.h" -#include "ops/gradinghuecurve/GradingHueCurve.h" #include "testutils/UnitTest.h" #include "UnitTestLogUtils.h" #include "UnitTestUtils.h" diff --git a/tests/cpu/fileformats/FileFormatHDL_tests.cpp b/tests/cpu/fileformats/FileFormatHDL_tests.cpp index 0b78d72282..0e89a091fc 100644 --- a/tests/cpu/fileformats/FileFormatHDL_tests.cpp +++ b/tests/cpu/fileformats/FileFormatHDL_tests.cpp @@ -2,10 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include + #include "fileformats/FileFormatHDL.cpp" #include "testutils/UnitTest.h" -#include "UnitTestUtils.h" namespace OCIO = OCIO_NAMESPACE; @@ -162,8 +165,8 @@ OCIO_ADD_TEST(FileFormatHDL, bake_1d) std::ostringstream output; baker->bake(output); - //std::cerr << "The LUT: " << std::endl << output.str() << std::endl; - //std::cerr << "Expected:" << std::endl << bout << std::endl; + //std::cerr << "The LUT: " << "\n" << output.str() << "\n"; + //std::cerr << "Expected:" << "\n" << bout << "\n"; // const StringUtils::StringVec osvec = StringUtils::SplitByLines(output.str()); @@ -489,8 +492,8 @@ OCIO_ADD_TEST(FileFormatHDL, bake_3d) std::ostringstream output; baker->bake(output); - //std::cerr << "The LUT: " << std::endl << output.str() << std::endl; - //std::cerr << "Expected:" << std::endl << bout << std::endl; + //std::cerr << "The LUT: " << "\n" << output.str() << "\n"; + //std::cerr << "Expected:" << "\n" << bout << "\n"; // const StringUtils::StringVec osvec = StringUtils::SplitByLines(output.str()); @@ -705,8 +708,8 @@ OCIO_ADD_TEST(FileFormatHDL, bake_3d_1d) std::ostringstream output; baker->bake(output); - //std::cerr << "The LUT: " << std::endl << output.str() << std::endl; - //std::cerr << "Expected:" << std::endl << bout << std::endl; + //std::cerr << "The LUT: " << "\n" << output.str() << "\n"; + //std::cerr << "Expected:" << "\n" << bout << "\n"; // const StringUtils::StringVec osvec = StringUtils::SplitByLines(output.str()); @@ -844,8 +847,8 @@ OCIO_ADD_TEST(FileFormatHDL, look_test) std::ostringstream output; baker->bake(output); - //std::cerr << "The LUT: " << std::endl << output.str() << std::endl; - //std::cerr << "Expected:" << std::endl << bout << std::endl; + //std::cerr << "The LUT: " << "\n" << output.str() << "\n"; + //std::cerr << "Expected:" << "\n" << bout << "\n"; // const StringUtils::StringVec osvec = StringUtils::SplitByLines(output.str()); diff --git a/tests/cpu/fileformats/FileFormatIridasCube_tests.cpp b/tests/cpu/fileformats/FileFormatIridasCube_tests.cpp index b834ce10a7..5287a3ed9a 100644 --- a/tests/cpu/fileformats/FileFormatIridasCube_tests.cpp +++ b/tests/cpu/fileformats/FileFormatIridasCube_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatIridasCube.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatIridasItx_tests.cpp b/tests/cpu/fileformats/FileFormatIridasItx_tests.cpp index 242183d72f..601c35710a 100644 --- a/tests/cpu/fileformats/FileFormatIridasItx_tests.cpp +++ b/tests/cpu/fileformats/FileFormatIridasItx_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatIridasItx.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatIridasLook_tests.cpp b/tests/cpu/fileformats/FileFormatIridasLook_tests.cpp index 6a864de076..6f93206647 100644 --- a/tests/cpu/fileformats/FileFormatIridasLook_tests.cpp +++ b/tests/cpu/fileformats/FileFormatIridasLook_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatIridasLook.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatPandora_tests.cpp b/tests/cpu/fileformats/FileFormatPandora_tests.cpp index 3ec6454e9c..4189f93a71 100644 --- a/tests/cpu/fileformats/FileFormatPandora_tests.cpp +++ b/tests/cpu/fileformats/FileFormatPandora_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatPandora.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatResolveCube_tests.cpp b/tests/cpu/fileformats/FileFormatResolveCube_tests.cpp index 6888d63d87..a5329118ae 100644 --- a/tests/cpu/fileformats/FileFormatResolveCube_tests.cpp +++ b/tests/cpu/fileformats/FileFormatResolveCube_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatResolveCube.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatSpi1D_tests.cpp b/tests/cpu/fileformats/FileFormatSpi1D_tests.cpp index 17f840e7a7..e1cfb77a0d 100644 --- a/tests/cpu/fileformats/FileFormatSpi1D_tests.cpp +++ b/tests/cpu/fileformats/FileFormatSpi1D_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatSpi1D.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatSpi3D_tests.cpp b/tests/cpu/fileformats/FileFormatSpi3D_tests.cpp index 40264f77c3..7c463ada3c 100644 --- a/tests/cpu/fileformats/FileFormatSpi3D_tests.cpp +++ b/tests/cpu/fileformats/FileFormatSpi3D_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatSpi3D.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatSpiMtx_tests.cpp b/tests/cpu/fileformats/FileFormatSpiMtx_tests.cpp index 64f9e666c1..8074186f11 100644 --- a/tests/cpu/fileformats/FileFormatSpiMtx_tests.cpp +++ b/tests/cpu/fileformats/FileFormatSpiMtx_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatSpiMtx.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatTruelight_tests.cpp b/tests/cpu/fileformats/FileFormatTruelight_tests.cpp index 79e1f54608..48d0d59efb 100644 --- a/tests/cpu/fileformats/FileFormatTruelight_tests.cpp +++ b/tests/cpu/fileformats/FileFormatTruelight_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FileFormatTruelight.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/FileFormatVF_tests.cpp b/tests/cpu/fileformats/FileFormatVF_tests.cpp index a90d10fef5..606f818531 100644 --- a/tests/cpu/fileformats/FileFormatVF_tests.cpp +++ b/tests/cpu/fileformats/FileFormatVF_tests.cpp @@ -2,7 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include #include "fileformats/FileFormatVF.cpp" diff --git a/tests/cpu/fileformats/FormatMetadata_tests.cpp b/tests/cpu/fileformats/FormatMetadata_tests.cpp index fdc447a460..5569c8ac2f 100644 --- a/tests/cpu/fileformats/FormatMetadata_tests.cpp +++ b/tests/cpu/fileformats/FormatMetadata_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/FormatMetadata.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/fileformats/ctf/CTFTransform_tests.cpp b/tests/cpu/fileformats/ctf/CTFTransform_tests.cpp index c5ec9c2e9e..a8457adacf 100644 --- a/tests/cpu/fileformats/ctf/CTFTransform_tests.cpp +++ b/tests/cpu/fileformats/ctf/CTFTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "fileformats/ctf/CTFTransform.cpp" #include "ops/matrix/MatrixOpData.h" diff --git a/tests/cpu/fileformats/xmlutils/XMLReaderUtils_tests.cpp b/tests/cpu/fileformats/xmlutils/XMLReaderUtils_tests.cpp index 44aa7d59fb..1bc7d559f1 100644 --- a/tests/cpu/fileformats/xmlutils/XMLReaderUtils_tests.cpp +++ b/tests/cpu/fileformats/xmlutils/XMLReaderUtils_tests.cpp @@ -3,6 +3,7 @@ #include +#include #include "fileformats/xmlutils/XMLReaderUtils.cpp" diff --git a/tests/cpu/ops/allocation/AllocationOp_tests.cpp b/tests/cpu/ops/allocation/AllocationOp_tests.cpp index b48bf14bde..4c200dd083 100644 --- a/tests/cpu/ops/allocation/AllocationOp_tests.cpp +++ b/tests/cpu/ops/allocation/AllocationOp_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/allocation/AllocationOp.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/cdl/CDLOp_tests.cpp b/tests/cpu/ops/cdl/CDLOp_tests.cpp index f4e2220511..02c734c3dc 100644 --- a/tests/cpu/ops/cdl/CDLOp_tests.cpp +++ b/tests/cpu/ops/cdl/CDLOp_tests.cpp @@ -3,6 +3,7 @@ #include +#include #include "ops/cdl/CDLOp.cpp" diff --git a/tests/cpu/ops/exponent/ExponentOp_tests.cpp b/tests/cpu/ops/exponent/ExponentOp_tests.cpp index a0db512f71..40be17e056 100644 --- a/tests/cpu/ops/exponent/ExponentOp_tests.cpp +++ b/tests/cpu/ops/exponent/ExponentOp_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/exponent/ExponentOp.cpp" #include "ops/noop/NoOps.h" diff --git a/tests/cpu/ops/exposurecontrast/ExposureContrastOpCPU_tests.cpp b/tests/cpu/ops/exposurecontrast/ExposureContrastOpCPU_tests.cpp index 99b6b8a384..521e3c74b5 100644 --- a/tests/cpu/ops/exposurecontrast/ExposureContrastOpCPU_tests.cpp +++ b/tests/cpu/ops/exposurecontrast/ExposureContrastOpCPU_tests.cpp @@ -2,7 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include + #include "ops/exposurecontrast/ExposureContrastOpCPU.cpp" +#include "BitDepthUtils.h" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/exposurecontrast/ExposureContrastOpData_tests.cpp b/tests/cpu/ops/exposurecontrast/ExposureContrastOpData_tests.cpp index 177e08f72f..f0e2e35fbb 100644 --- a/tests/cpu/ops/exposurecontrast/ExposureContrastOpData_tests.cpp +++ b/tests/cpu/ops/exposurecontrast/ExposureContrastOpData_tests.cpp @@ -5,6 +5,7 @@ #include "ops/exposurecontrast/ExposureContrastOpData.cpp" #include "testutils/UnitTest.h" +#include "Platform.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/fixedfunction/FixedFunctionOpCPU_tests.cpp b/tests/cpu/ops/fixedfunction/FixedFunctionOpCPU_tests.cpp index 7af081d047..c3604831cd 100644 --- a/tests/cpu/ops/fixedfunction/FixedFunctionOpCPU_tests.cpp +++ b/tests/cpu/ops/fixedfunction/FixedFunctionOpCPU_tests.cpp @@ -3,6 +3,7 @@ #include +#include #include "ops/fixedfunction/FixedFunctionOpCPU.cpp" @@ -10,6 +11,10 @@ #include "UnitTestUtils.h" #include "ops/lut3d/Lut3DOp.h" +#if DUMP_RESULT +#include +#endif + namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/fixedfunction/FixedFunctionOp_tests.cpp b/tests/cpu/ops/fixedfunction/FixedFunctionOp_tests.cpp index 1f6e8cfc8b..99337e2294 100644 --- a/tests/cpu/ops/fixedfunction/FixedFunctionOp_tests.cpp +++ b/tests/cpu/ops/fixedfunction/FixedFunctionOp_tests.cpp @@ -4,10 +4,8 @@ #include "ops/fixedfunction/FixedFunctionOp.cpp" -#include "MathUtils.h" #include "utils/StringUtils.h" #include "testutils/UnitTest.h" -#include "UnitTestUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp b/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp index 467e1029e0..0916b93cb6 100644 --- a/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp +++ b/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp @@ -2,10 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "ops/gamma/GammaOpCPU.cpp" #include "MathUtils.h" -#include "ParseUtils.h" #include "ops/gamma/GammaOp.h" #include "testutils/UnitTest.h" #include "UnitTestUtils.h" diff --git a/tests/cpu/ops/gamma/GammaOp_tests.cpp b/tests/cpu/ops/gamma/GammaOp_tests.cpp index 6fdd5cd132..9ebbff5ad0 100644 --- a/tests/cpu/ops/gamma/GammaOp_tests.cpp +++ b/tests/cpu/ops/gamma/GammaOp_tests.cpp @@ -2,11 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. -#include "MathUtils.h" #include "ops/gamma/GammaOp.cpp" -#include "ParseUtils.h" #include "testutils/UnitTest.h" -#include "UnitTestUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/gradinghuecurve/GradingHueCurveOpCPU_tests.cpp b/tests/cpu/ops/gradinghuecurve/GradingHueCurveOpCPU_tests.cpp index 5fe9ad4f97..44018327f6 100644 --- a/tests/cpu/ops/gradinghuecurve/GradingHueCurveOpCPU_tests.cpp +++ b/tests/cpu/ops/gradinghuecurve/GradingHueCurveOpCPU_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/gradinghuecurve/GradingHueCurveOpCPU.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/gradinghuecurve/GradingHueCurve_tests.cpp b/tests/cpu/ops/gradinghuecurve/GradingHueCurve_tests.cpp index 621846cf6c..9bdadc7ba6 100644 --- a/tests/cpu/ops/gradinghuecurve/GradingHueCurve_tests.cpp +++ b/tests/cpu/ops/gradinghuecurve/GradingHueCurve_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "DynamicProperty.h" #include "ops/gradinghuecurve/GradingHueCurve.cpp" diff --git a/tests/cpu/ops/gradingprimary/GradingPrimaryOpCPU_tests.cpp b/tests/cpu/ops/gradingprimary/GradingPrimaryOpCPU_tests.cpp index 14535386f8..4315729e90 100644 --- a/tests/cpu/ops/gradingprimary/GradingPrimaryOpCPU_tests.cpp +++ b/tests/cpu/ops/gradingprimary/GradingPrimaryOpCPU_tests.cpp @@ -2,10 +2,13 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/gradingprimary/GradingPrimaryOpCPU.cpp" #include "testutils/UnitTest.h" #include "utils/StringUtils.h" +#include "MathUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/gradingrgbcurve/GradingBSplineCurve_tests.cpp b/tests/cpu/ops/gradingrgbcurve/GradingBSplineCurve_tests.cpp index b0f5a48c40..d9de92b988 100644 --- a/tests/cpu/ops/gradingrgbcurve/GradingBSplineCurve_tests.cpp +++ b/tests/cpu/ops/gradingrgbcurve/GradingBSplineCurve_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/gradingrgbcurve/GradingBSplineCurve.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/gradingrgbcurve/GradingRGBCurveOpCPU_tests.cpp b/tests/cpu/ops/gradingrgbcurve/GradingRGBCurveOpCPU_tests.cpp index cd9005cd3f..3c65b498cc 100644 --- a/tests/cpu/ops/gradingrgbcurve/GradingRGBCurveOpCPU_tests.cpp +++ b/tests/cpu/ops/gradingrgbcurve/GradingRGBCurveOpCPU_tests.cpp @@ -2,10 +2,15 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include + #include "ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp" #include "testutils/UnitTest.h" #include "utils/StringUtils.h" +#include "MathUtils.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/ops/gradingrgbcurve/GradingRGBCurve_tests.cpp b/tests/cpu/ops/gradingrgbcurve/GradingRGBCurve_tests.cpp index 167463a2eb..497ecc9d74 100644 --- a/tests/cpu/ops/gradingrgbcurve/GradingRGBCurve_tests.cpp +++ b/tests/cpu/ops/gradingrgbcurve/GradingRGBCurve_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "DynamicProperty.h" #include "ops/gradingrgbcurve/GradingRGBCurve.cpp" diff --git a/tests/cpu/ops/gradingtone/GradingToneOpCPU_tests.cpp b/tests/cpu/ops/gradingtone/GradingToneOpCPU_tests.cpp index 625084f4d8..e444944949 100644 --- a/tests/cpu/ops/gradingtone/GradingToneOpCPU_tests.cpp +++ b/tests/cpu/ops/gradingtone/GradingToneOpCPU_tests.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. #include +#include #include "ops/gradingtone/GradingToneOpCPU.cpp" diff --git a/tests/cpu/ops/log/LogOpCPU_tests.cpp b/tests/cpu/ops/log/LogOpCPU_tests.cpp index 9826f6a1fa..53ecfbc8f4 100644 --- a/tests/cpu/ops/log/LogOpCPU_tests.cpp +++ b/tests/cpu/ops/log/LogOpCPU_tests.cpp @@ -2,6 +2,11 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include + #include "ops/log/LogOpCPU.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/log/LogOpData_tests.cpp b/tests/cpu/ops/log/LogOpData_tests.cpp index 57466c05f1..dc667bf604 100644 --- a/tests/cpu/ops/log/LogOpData_tests.cpp +++ b/tests/cpu/ops/log/LogOpData_tests.cpp @@ -2,6 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. +#include "ops/log/LogUtils.h" #include "ops/log/LogOpData.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/lut1d/Lut1DOpCPU_tests.cpp b/tests/cpu/ops/lut1d/Lut1DOpCPU_tests.cpp index f4fa4aa9c9..99bd5429e2 100644 --- a/tests/cpu/ops/lut1d/Lut1DOpCPU_tests.cpp +++ b/tests/cpu/ops/lut1d/Lut1DOpCPU_tests.cpp @@ -2,6 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include + #include "ops/lut1d/Lut1DOpCPU.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/lut1d/Lut1DOpData_tests.cpp b/tests/cpu/ops/lut1d/Lut1DOpData_tests.cpp index 01a5822d1d..79e9eb851b 100644 --- a/tests/cpu/ops/lut1d/Lut1DOpData_tests.cpp +++ b/tests/cpu/ops/lut1d/Lut1DOpData_tests.cpp @@ -2,6 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "ops/lut1d/Lut1DOpData.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/lut1d/Lut1DOp_tests.cpp b/tests/cpu/ops/lut1d/Lut1DOp_tests.cpp index cf20b9d383..2f3ccb2148 100644 --- a/tests/cpu/ops/lut1d/Lut1DOp_tests.cpp +++ b/tests/cpu/ops/lut1d/Lut1DOp_tests.cpp @@ -2,7 +2,7 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include #include "ops/lut1d/Lut1DOp.cpp" diff --git a/tests/cpu/ops/lut3d/Lut3DOp_tests.cpp b/tests/cpu/ops/lut3d/Lut3DOp_tests.cpp index 6377c7778e..36ff8ea381 100644 --- a/tests/cpu/ops/lut3d/Lut3DOp_tests.cpp +++ b/tests/cpu/ops/lut3d/Lut3DOp_tests.cpp @@ -4,11 +4,12 @@ #include #include +#include #ifndef _WIN32 #include #endif -#include "BitDepthUtils.h" +#include "ops/matrix/MatrixOp.h" #include "OpBuilders.h" #include "ops/lut3d/Lut3DOp.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/ops/matrix/MatrixOp_tests.cpp b/tests/cpu/ops/matrix/MatrixOp_tests.cpp index 47b09e7ff0..5ec72299ba 100644 --- a/tests/cpu/ops/matrix/MatrixOp_tests.cpp +++ b/tests/cpu/ops/matrix/MatrixOp_tests.cpp @@ -1,6 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include #include "ops/log/LogOp.h" diff --git a/tests/cpu/ops/noop/NoOps_tests.cpp b/tests/cpu/ops/noop/NoOps_tests.cpp index 9f23640ed5..192f38db70 100644 --- a/tests/cpu/ops/noop/NoOps_tests.cpp +++ b/tests/cpu/ops/noop/NoOps_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/noop/NoOps.cpp" #include "ops/lut1d/Lut1DOp.h" @@ -243,12 +245,12 @@ OCIO_ADD_TEST(NoOps, partition_gpu_ops) gpuLatticeOps, gpuPostOps) ); /* - std::cerr << "gpuPreOps" << std::endl; - std::cerr << SerializeOpVec(gpuPreOps, 4) << std::endl; - std::cerr << "gpuLatticeOps" << std::endl; - std::cerr << SerializeOpVec(gpuLatticeOps, 4) << std::endl; - std::cerr << "gpuPostOps" << std::endl; - std::cerr << SerializeOpVec(gpuPostOps, 4) << std::endl; + std::cerr << "gpuPreOps" << "\n"; + std::cerr << SerializeOpVec(gpuPreOps, 4) << "\n"; + std::cerr << "gpuLatticeOps" << "\n"; + std::cerr << SerializeOpVec(gpuLatticeOps, 4) << "\n"; + std::cerr << "gpuPostOps" << "\n"; + std::cerr << SerializeOpVec(gpuPostOps, 4) << "\n"; */ } } // PartitionGPUOps diff --git a/tests/cpu/ops/range/RangeOp_tests.cpp b/tests/cpu/ops/range/RangeOp_tests.cpp index 2a52227a69..c865c01fd8 100644 --- a/tests/cpu/ops/range/RangeOp_tests.cpp +++ b/tests/cpu/ops/range/RangeOp_tests.cpp @@ -2,8 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. -#include "BitDepthUtils.h" -#include "ops/matrix/MatrixOp.h" +#include +#include #include "ops/range/RangeOp.cpp" diff --git a/tests/cpu/transforms/BuiltinTransform_tests.cpp b/tests/cpu/transforms/BuiltinTransform_tests.cpp index cc57edf412..41d8b75588 100644 --- a/tests/cpu/transforms/BuiltinTransform_tests.cpp +++ b/tests/cpu/transforms/BuiltinTransform_tests.cpp @@ -2,16 +2,21 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include #include -#include +#include #include +#include +#include +#include +#include +#include #include "transforms/BuiltinTransform.cpp" #include "ops/lut3d/Lut3DOp.h" -#include "ops/matrix/MatrixOp.h" -#include "Platform.h" -#include "transforms/builtins/ACES.h" + #include "transforms/builtins/ColorMatrixHelpers.h" #include "transforms/builtins/OpHelpers.h" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/CDLTransform_tests.cpp b/tests/cpu/transforms/CDLTransform_tests.cpp index 06bfe56dbf..82da6ca6dd 100644 --- a/tests/cpu/transforms/CDLTransform_tests.cpp +++ b/tests/cpu/transforms/CDLTransform_tests.cpp @@ -3,6 +3,9 @@ #include +#include +#include +#include #include "ops/exponent/ExponentOp.h" #include "ops/matrix/MatrixOpData.h" @@ -13,6 +16,7 @@ #include "UnitTestUtils.h" #include "Platform.h" +#include "OpBuilders.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/transforms/DisplayViewTransform_tests.cpp b/tests/cpu/transforms/DisplayViewTransform_tests.cpp index 082ea3ee0e..b3a1852fff 100644 --- a/tests/cpu/transforms/DisplayViewTransform_tests.cpp +++ b/tests/cpu/transforms/DisplayViewTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "transforms/DisplayViewTransform.cpp" #include "ops/cdl/CDLOpData.h" diff --git a/tests/cpu/transforms/ExponentTransform_tests.cpp b/tests/cpu/transforms/ExponentTransform_tests.cpp index 329636a3e0..ca528163a2 100644 --- a/tests/cpu/transforms/ExponentTransform_tests.cpp +++ b/tests/cpu/transforms/ExponentTransform_tests.cpp @@ -2,8 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include "OpBuilders.h" #include "ops/exponent/ExponentOp.h" -#include "ops/gamma/GammaOp.h" #include "transforms/ExponentTransform.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/FileTransform_tests.cpp b/tests/cpu/transforms/FileTransform_tests.cpp index 9b78b9c50f..d3187f6b29 100644 --- a/tests/cpu/transforms/FileTransform_tests.cpp +++ b/tests/cpu/transforms/FileTransform_tests.cpp @@ -2,7 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. -#include +#include +#include #include "transforms/FileTransform.cpp" @@ -10,6 +11,7 @@ #include "testutils/UnitTest.h" #include "UnitTestLogUtils.h" #include "UnitTestUtils.h" +#include "Platform.h" namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/cpu/transforms/GradingHueCurveTransform_tests.cpp b/tests/cpu/transforms/GradingHueCurveTransform_tests.cpp index 26d5bba759..a7776f528d 100644 --- a/tests/cpu/transforms/GradingHueCurveTransform_tests.cpp +++ b/tests/cpu/transforms/GradingHueCurveTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/gradingrgbcurve/GradingBSplineCurve.h" #include "transforms/GradingHueCurveTransform.cpp" diff --git a/tests/cpu/transforms/GradingPrimaryTransform_tests.cpp b/tests/cpu/transforms/GradingPrimaryTransform_tests.cpp index 355e7a97d6..fcf801ed02 100644 --- a/tests/cpu/transforms/GradingPrimaryTransform_tests.cpp +++ b/tests/cpu/transforms/GradingPrimaryTransform_tests.cpp @@ -2,6 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "MathUtils.h" #include "transforms/GradingPrimaryTransform.cpp" @@ -344,10 +347,10 @@ OCIO_ADD_TEST(GradingPrimaryTransform, serialization) primary->setValue(data); static constexpr char PRIMARY_STR[] - = ", contrast=, "\ - "gamma=, offset=, "\ - "exposure=, lift=, "\ + = ", contrast=, " + "gamma=, offset=, " + "exposure=, lift=, " "gain=, saturation=1, pivot=>>"; { diff --git a/tests/cpu/transforms/GradingRGBCurveTransform_tests.cpp b/tests/cpu/transforms/GradingRGBCurveTransform_tests.cpp index 26b568f8f1..f27c80ce7d 100644 --- a/tests/cpu/transforms/GradingRGBCurveTransform_tests.cpp +++ b/tests/cpu/transforms/GradingRGBCurveTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/gradingrgbcurve/GradingBSplineCurve.h" #include "transforms/GradingRGBCurveTransform.cpp" @@ -242,10 +244,10 @@ OCIO_ADD_TEST(GradingRGBCurveTransform, serialization) curve->setValue(data); static constexpr char CURVE_STR[] - = "]>, "\ - "green=]>, "\ - "blue=]>, "\ + = "]>, " + "green=]>, " + "blue=]>, " "master=]>>>"; { diff --git a/tests/cpu/transforms/GradingToneTransform_tests.cpp b/tests/cpu/transforms/GradingToneTransform_tests.cpp index 692cb6e83c..5dd850f683 100644 --- a/tests/cpu/transforms/GradingToneTransform_tests.cpp +++ b/tests/cpu/transforms/GradingToneTransform_tests.cpp @@ -2,6 +2,9 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include + #include "transforms/GradingToneTransform.cpp" #include "testutils/UnitTest.h" @@ -63,11 +66,11 @@ OCIO_ADD_TEST(GradingToneTransform, serialization) tone->setValue(data); static constexpr char TONE_STR[] - = " "\ - "shadows= "\ - "midtones= "\ - "highlights= "\ + = " " + "shadows= " + "midtones= " + "highlights= " "whites= s_contrast=1.123>>"; { diff --git a/tests/cpu/transforms/GroupTransform_tests.cpp b/tests/cpu/transforms/GroupTransform_tests.cpp index 67a0f656df..438518db78 100644 --- a/tests/cpu/transforms/GroupTransform_tests.cpp +++ b/tests/cpu/transforms/GroupTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "transforms/GroupTransform.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/LookTransform_tests.cpp b/tests/cpu/transforms/LookTransform_tests.cpp index 1a2c5e801c..03ff597255 100644 --- a/tests/cpu/transforms/LookTransform_tests.cpp +++ b/tests/cpu/transforms/LookTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "ops/cdl/CDLOpData.h" #include "ops/fixedfunction/FixedFunctionOpData.h" #include "ops/gamma/GammaOpData.h" diff --git a/tests/cpu/transforms/Lut1DTransform_tests.cpp b/tests/cpu/transforms/Lut1DTransform_tests.cpp index f31e9dc0fc..4b67c9e82a 100644 --- a/tests/cpu/transforms/Lut1DTransform_tests.cpp +++ b/tests/cpu/transforms/Lut1DTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "transforms/Lut1DTransform.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/Lut3DTransform_tests.cpp b/tests/cpu/transforms/Lut3DTransform_tests.cpp index db3296e7d2..44d7485d68 100644 --- a/tests/cpu/transforms/Lut3DTransform_tests.cpp +++ b/tests/cpu/transforms/Lut3DTransform_tests.cpp @@ -2,6 +2,8 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "transforms/Lut3DTransform.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/RangeTransform_tests.cpp b/tests/cpu/transforms/RangeTransform_tests.cpp index 9e4298b424..5e6840cecb 100644 --- a/tests/cpu/transforms/RangeTransform_tests.cpp +++ b/tests/cpu/transforms/RangeTransform_tests.cpp @@ -2,8 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. -#include - #include "transforms/RangeTransform.cpp" #include "testutils/UnitTest.h" diff --git a/tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp b/tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp index c67245debd..ac4ba0dc65 100644 --- a/tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp +++ b/tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp @@ -2,9 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. +#include + #include "transforms/builtins/BuiltinTransformRegistry.cpp" #include "testutils/UnitTest.h" +#include "Platform.h" namespace OCIO = OCIO_NAMESPACE; @@ -261,7 +264,7 @@ active_views: [] OCIO_CHECK_THROW_WHAT(OCIO::Config::CreateFromStream(iss), OCIO::Exception, - "Only config version 2.1 (or higher) can have BuiltinTransform style "\ + "Only config version 2.1 (or higher) can have BuiltinTransform style " "'ACES-LMT - ACES 1.3 Reference Gamut Compression'."); } @@ -305,7 +308,7 @@ active_views: [] OCIO_CHECK_THROW_WHAT(OCIO::Config::CreateFromStream(iss), OCIO::Exception, - "Only config version 2.2 (or higher) can have BuiltinTransform style "\ + "Only config version 2.2 (or higher) can have BuiltinTransform style " "'ARRI_LOGC4_to_ACES2065-1'."); } diff --git a/tests/gpu/CDLOp_test.cpp b/tests/gpu/CDLOp_test.cpp index 3ad29d9e6b..c4bda4339e 100644 --- a/tests/gpu/CDLOp_test.cpp +++ b/tests/gpu/CDLOp_test.cpp @@ -3,7 +3,6 @@ #include -#include #include #include diff --git a/tests/gpu/Config_test.cpp b/tests/gpu/Config_test.cpp index 8c807b7b4c..001e0cae8b 100644 --- a/tests/gpu/Config_test.cpp +++ b/tests/gpu/Config_test.cpp @@ -123,9 +123,9 @@ OCIO_ADD_GPU_TEST(Config, arbitrary_generic_shader) " - ! {src: lut1d_1.spi1d, interpolation: linear}\n" " - ! {src: lut1d_2.spi1d, interpolation: linear}\n" " - ! {base: 10}\n" - " - ! {matrix: [0.075573, 0.022197, 0.00223, 0, "\ - "0.005901, 0.096928, -0.002829, 0, "\ - "0.016134, 0.007406, 0.07646, 0, "\ + " - ! {matrix: [0.075573, 0.022197, 0.00223, 0, " + "0.005901, 0.096928, -0.002829, 0, " + "0.016134, 0.007406, 0.07646, 0, " "0, 0, 0, 1]}\n"; std::istringstream is; @@ -194,9 +194,9 @@ OCIO_ADD_GPU_TEST(Config, with_underscores) " allocationvars: [0, 1]\n" " from_reference: !\n" " children:\n" - " - ! {matrix: [0.075573, 0.022197, 0.00223, 0, "\ - "0.005901, 0.096928, -0.002829, 0, "\ - "0.016134, 0.007406, 0.07646, 0, "\ + " - ! {matrix: [0.075573, 0.022197, 0.00223, 0, " + "0.005901, 0.096928, -0.002829, 0, " + "0.016134, 0.007406, 0.07646, 0, " "0, 0, 0, 1]}\n" " - ! {src: lut1d_3.spi1d, interpolation: linear}\n"; diff --git a/tests/gpu/FixedFunctionOp_test.cpp b/tests/gpu/FixedFunctionOp_test.cpp index 6c3879d858..5a41f7cbdb 100644 --- a/tests/gpu/FixedFunctionOp_test.cpp +++ b/tests/gpu/FixedFunctionOp_test.cpp @@ -2,10 +2,14 @@ // Copyright Contributors to the OpenColorIO Project. + +#include +#include + #include #include "GPUUnitTest.h" -#include + namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/gpu/GPUUnitTest.cpp b/tests/gpu/GPUUnitTest.cpp index 6508131218..5a4e58ac71 100644 --- a/tests/gpu/GPUUnitTest.cpp +++ b/tests/gpu/GPUUnitTest.cpp @@ -4,9 +4,13 @@ #include #include -#include +#include #include +#include +#include #include +#include +#include #include @@ -556,7 +560,7 @@ int main(int argc, const char ** argv) if (ap.parse(argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); return 1; } @@ -579,7 +583,7 @@ int main(int argc, const char ** argv) if (results.size() >= 3) { - std::cerr << "Invalid value for the argument '--run_only'." << std::endl; + std::cerr << "Invalid value for the argument '--run_only'.\n"; ap.usage(); return 1; } @@ -597,7 +601,7 @@ int main(int argc, const char ** argv) #if __APPLE__ app = OCIO::MetalApp::CreateMetalGlApp("GPU tests - Metal", 10, 10); #else - std::cerr << std::endl << "'GPU tests - Metal' is not supported" << std::endl; + std::cerr << "\n'GPU tests - Metal' is not supported\n"; return 1; #endif } @@ -608,7 +612,7 @@ int main(int argc, const char ** argv) } catch (const OCIO::Exception & e) { - std::cerr << std::endl << e.what() << std::endl; + std::cerr << "\n" << e.what() << "\n"; return 1; } @@ -721,17 +725,17 @@ int main(int argc, const char ** argv) catch(OCIO::Exception & ex) { ++failures; - std::cerr << "FAILED - " << ex.what() << std::endl; + std::cerr << "FAILED - " << ex.what() << "\n"; } catch(...) { ++failures; - std::cerr << "FAILED - Unexpected error" << std::endl; + std::cerr << "FAILED - Unexpected error\n"; } if (!enabledTest) { - std::cout << "DISABLED" << std::endl; + std::cout << "DISABLED\n" << std::flush; } else if(curr_failures==failures && test->isValid()) { @@ -741,18 +745,18 @@ int main(int argc, const char ** argv) std::cout << "PASSED - (MaxDiff: " << test->getMaxDiff() << " at pix[" << pixelIdx - << "][" << componentIdx << "])" << std::endl; + << "][" << componentIdx << "])\n" << std::flush; } else if(!test->isValid()) { ++failures; - std::cerr << "FAILED - Invalid test" << std::endl; + std::cerr << "FAILED - Invalid test\n"; } // Get rid of the test. tests[idx] = nullptr; } - std::cout << std::endl << failures << " tests failed" << std::endl << std::endl; + std::cout << "\n" << failures << " tests failed\n\n" << std::flush; return failures; } diff --git a/tests/gpu/GPUUnitTest.h b/tests/gpu/GPUUnitTest.h index 59d07183d2..5d5711e232 100644 --- a/tests/gpu/GPUUnitTest.h +++ b/tests/gpu/GPUUnitTest.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include "CPUInfoConfig.h" diff --git a/tests/gpu/GradingHueCurveOp_test.cpp b/tests/gpu/GradingHueCurveOp_test.cpp index 9a11626939..8d416ea0d5 100644 --- a/tests/gpu/GradingHueCurveOp_test.cpp +++ b/tests/gpu/GradingHueCurveOp_test.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include + #include #include "GPUUnitTest.h" diff --git a/tests/gpu/LogOp_test.cpp b/tests/gpu/LogOp_test.cpp index 188f840dfd..f2ad49fe7d 100644 --- a/tests/gpu/LogOp_test.cpp +++ b/tests/gpu/LogOp_test.cpp @@ -1,9 +1,9 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include +#include -#include +#include #include "GPUUnitTest.h" diff --git a/tests/gpu/Lut1DOp_test.cpp b/tests/gpu/Lut1DOp_test.cpp index cb76697619..2ee2acc484 100644 --- a/tests/gpu/Lut1DOp_test.cpp +++ b/tests/gpu/Lut1DOp_test.cpp @@ -3,7 +3,6 @@ #include -#include #include #include diff --git a/tests/gpu/Lut3DOp_test.cpp b/tests/gpu/Lut3DOp_test.cpp index d1ee3aa3de..a6ce1f75d2 100644 --- a/tests/gpu/Lut3DOp_test.cpp +++ b/tests/gpu/Lut3DOp_test.cpp @@ -2,7 +2,6 @@ // Copyright Contributors to the OpenColorIO Project. #include -#include #include #include diff --git a/tests/gpu/RangeOp_test.cpp b/tests/gpu/RangeOp_test.cpp index 3ae2c90012..16d0c3c530 100644 --- a/tests/gpu/RangeOp_test.cpp +++ b/tests/gpu/RangeOp_test.cpp @@ -1,10 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. -#include -#include -#include - #include #include "GPUUnitTest.h" diff --git a/tests/osl/UnitTestMain.cpp b/tests/osl/UnitTestMain.cpp index 5e105b5715..af0c5468e1 100644 --- a/tests/osl/UnitTestMain.cpp +++ b/tests/osl/UnitTestMain.cpp @@ -5,6 +5,11 @@ #include #include #include +#include +#include +#include +#include +#include #include namespace OCIO = OCIO_NAMESPACE; @@ -274,14 +279,14 @@ int main(int, const char **) test->m_expectedMinimalValue, test->m_relativeComparison); - std::cerr << "PASSED" << std::endl; + std::cerr << "PASSED\n"; } catch(std::exception & ex) { failures++; - std::cerr << "FAILED" << std::endl; - std::cerr << ex.what() << std::endl; + std::cerr << "FAILED\n"; + std::cerr << ex.what() << "\n"; std::cerr << "\n***********\n"; std::cerr << oslShaderString; @@ -291,8 +296,8 @@ int main(int, const char **) { failures++; - std::cerr << "FAILED" << std::endl; - std::cerr << "Unexpected exception!" << std::endl; + std::cerr << "FAILED\n"; + std::cerr << "Unexpected exception!\n"; std::cerr << "\n***********\n"; std::cerr << oslShaderString; @@ -302,6 +307,6 @@ int main(int, const char **) noTest++; } - std::cerr << std::endl << failures << " tests failed" << std::endl << std::endl; + std::cerr << "\n" << failures << " tests failed\n\n"; return failures; } diff --git a/tests/osl/UnitTestOSL.cpp b/tests/osl/UnitTestOSL.cpp index 7f09055ede..a499f847a0 100644 --- a/tests/osl/UnitTestOSL.cpp +++ b/tests/osl/UnitTestOSL.cpp @@ -2,6 +2,12 @@ // Copyright Contributors to the OpenColorIO Project. +#include +#include +#include +#include +#include + #include "UnitTestOSL.h" #include diff --git a/tests/osl/UnitTestOSL.h b/tests/osl/UnitTestOSL.h index 4b64c9834a..2f84eea706 100644 --- a/tests/osl/UnitTestOSL.h +++ b/tests/osl/UnitTestOSL.h @@ -11,6 +11,7 @@ #include #include +#include // Trap the OSL messages in case of error. diff --git a/tests/testutils/UnitTest.cpp b/tests/testutils/UnitTest.cpp index 3269f56b22..43a5e8e9c0 100644 --- a/tests/testutils/UnitTest.cpp +++ b/tests/testutils/UnitTest.cpp @@ -7,7 +7,15 @@ #include #endif -#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "apputils/argparse.h" #include "UnitTest.h" @@ -92,7 +100,7 @@ int UnitTestMain(int argc, const char ** argv) if (ap.parse(argc, argv) < 0) { - std::cerr << ap.geterror() << std::endl; + std::cerr << ap.geterror() << "\n"; ap.usage(); return 1; } @@ -115,7 +123,7 @@ int UnitTestMain(int argc, const char ** argv) if (results.size() >= 3) { - std::cerr << "Invalid value for the argument '--run_only'." << std::endl; + std::cerr << "Invalid value for the argument '--run_only'.\n"; ap.usage(); return 1; } @@ -157,12 +165,12 @@ int UnitTestMain(int argc, const char ** argv) } catch(std::exception & ex) { - std::cerr << "\nFAILED: " << ex.what() << "." << std::endl; + std::cerr << "\nFAILED: " << ex.what() << ".\n"; ++unit_test_failures; } catch(...) { - std::cerr << "\nFAILED: Unexpected error." << std::endl; + std::cerr << "\nFAILED: Unexpected error.\n"; ++unit_test_failures; } @@ -186,7 +194,7 @@ int UnitTestMain(int argc, const char ** argv) << std::left << std::setw(maxCharToDisplay+1) << name << "] - " << (passing ? "PASSED" : "FAILED") - << std::endl; + << "\n"; if (stopOnFirstError && !passing) { diff --git a/tests/testutils/UnitTest.h b/tests/testutils/UnitTest.h index f4bb339ee4..42561e969f 100644 --- a/tests/testutils/UnitTest.h +++ b/tests/testutils/UnitTest.h @@ -39,6 +39,9 @@ #include #include #include +#include +#include +#include extern int unit_test_failures; diff --git a/tests/utils/NumberUtils_tests.cpp b/tests/utils/NumberUtils_tests.cpp index ba03cd9a7f..0d83482f21 100644 --- a/tests/utils/NumberUtils_tests.cpp +++ b/tests/utils/NumberUtils_tests.cpp @@ -6,6 +6,7 @@ #include "utils/NumberUtils.h" #include +#include namespace OCIO = OCIO_NAMESPACE; diff --git a/tests/utils/UnitTestMain.cpp b/tests/utils/UnitTestMain.cpp index 7f9810063c..ae7a026d86 100644 --- a/tests/utils/UnitTestMain.cpp +++ b/tests/utils/UnitTestMain.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. +#include #include "testutils/UnitTest.h" diff --git a/vendor/nuke/OCIOCDLTransform/OCIOCDLTransform.cpp b/vendor/nuke/OCIOCDLTransform/OCIOCDLTransform.cpp index df7ee0f6b7..a0e667443a 100644 --- a/vendor/nuke/OCIOCDLTransform/OCIOCDLTransform.cpp +++ b/vendor/nuke/OCIOCDLTransform/OCIOCDLTransform.cpp @@ -365,8 +365,8 @@ const char* OCIOCDLTransform::displayName() const const char* OCIOCDLTransform::node_help() const { // TODO more detailed help text - return "Use OpenColorIO to apply an ASC CDL grade. Applied using:\n\n"\ - "out = (i * s + o)^p\n\nWhere i is the input value, s is slope, "\ + return "Use OpenColorIO to apply an ASC CDL grade. Applied using:\n\n" + "out = (i * s + o)^p\n\nWhere i is the input value, s is slope, " "o is offset and p is power"; } diff --git a/vendor/nuke/OCIOColorSpace/OCIOColorSpace.cpp b/vendor/nuke/OCIOColorSpace/OCIOColorSpace.cpp index 091c1efdb3..8852435c19 100644 --- a/vendor/nuke/OCIOColorSpace/OCIOColorSpace.cpp +++ b/vendor/nuke/OCIOColorSpace/OCIOColorSpace.cpp @@ -63,11 +63,11 @@ OCIOColorSpace::OCIOColorSpace(Node *n) : DD::Image::PixelIop(n) } catch (OCIO::Exception& e) { - std::cerr << "OCIOColorSpace: " << e.what() << std::endl; + std::cerr << "OCIOColorSpace: " << e.what() << "\n"; } catch (...) { - std::cerr << "OCIOColorSpace: Unknown exception during OCIO setup." << std::endl; + std::cerr << "OCIOColorSpace: Unknown exception during OCIO setup.\n"; } // Then, create a cstr array for passing to Nuke @@ -86,8 +86,7 @@ OCIOColorSpace::OCIOColorSpace(Node *n) : DD::Image::PixelIop(n) if(!m_hasColorSpaces) { - std::cerr << "OCIOColorSpace: No color spaces available for input and/or output." << std::endl; - } + std::cerr << "OCIOColorSpace: No color spaces available for input and/or output.\n" } OCIOColorSpace::~OCIOColorSpace() diff --git a/vendor/nuke/OCIODisplay/OCIODisplay.cpp b/vendor/nuke/OCIODisplay/OCIODisplay.cpp index bf82ab8504..4af1d02a7c 100644 --- a/vendor/nuke/OCIODisplay/OCIODisplay.cpp +++ b/vendor/nuke/OCIODisplay/OCIODisplay.cpp @@ -78,11 +78,11 @@ OCIODisplay::OCIODisplay(Node *n) : DD::Image::PixelIop(n) } catch(OCIO::Exception& e) { - std::cerr << "OCIODisplay: " << e.what() << std::endl; + std::cerr << "OCIODisplay: " << e.what() << "\n"; } catch(...) { - std::cerr << "OCIODisplay: Unknown exception during OCIO setup." << std::endl; + std::cerr << "OCIODisplay: Unknown exception during OCIO setup.\n"; } // Build the cstr vectors on our second pass @@ -104,7 +104,7 @@ OCIODisplay::OCIODisplay(Node *n) : DD::Image::PixelIop(n) if(!m_hasLists) { - std::cerr << "OCIODisplay: Missing one or more of colorspaces, display devices, or display transforms." << std::endl; + std::cerr << "OCIODisplay: Missing one or more of colorspaces, display devices, or display transforms.\n"; } } diff --git a/vendor/nuke/OCIOLookTransform/OCIOLookTransform.cpp b/vendor/nuke/OCIOLookTransform/OCIOLookTransform.cpp index 9dfac56536..f92b620b1a 100644 --- a/vendor/nuke/OCIOLookTransform/OCIOLookTransform.cpp +++ b/vendor/nuke/OCIOLookTransform/OCIOLookTransform.cpp @@ -89,11 +89,11 @@ OCIOLookTransform::OCIOLookTransform(Node *n) : DD::Image::PixelIop(n) } catch (const OCIO::Exception& e) { - std::cerr << "OCIOLookTransform: " << e.what() << std::endl; + std::cerr << "OCIOLookTransform: " << e.what() << "\n"; } catch (...) { - std::cerr << "OCIOLookTransform: Unknown exception during OCIO setup." << std::endl; + std::cerr << "OCIOLookTransform: Unknown exception during OCIO setup.\n"; } if(!config) @@ -139,7 +139,7 @@ OCIOLookTransform::OCIOLookTransform(Node *n) : DD::Image::PixelIop(n) if(!m_hasColorSpaces) { - std::cerr << "OCIOLookTransform: No ColorSpaces available for input and/or output." << std::endl; + std::cerr << "OCIOLookTransform: No ColorSpaces available for input and/or output.\n"; } } diff --git a/vendor/openfx/Support/Library/ofxsCore.cpp b/vendor/openfx/Support/Library/ofxsCore.cpp index 50c4f03260..6120ed1513 100644 --- a/vendor/openfx/Support/Library/ofxsCore.cpp +++ b/vendor/openfx/Support/Library/ofxsCore.cpp @@ -61,13 +61,13 @@ namespace OFX { default : # ifdef DEBUG - std::cout << "Threw suite exception!" << std::endl; + std::cout << "Threw suite exception!" << "\n"; # if defined(__APPLE__) || defined(linux) void* callstack[128]; int i, frames = backtrace(callstack, 128); char** strs = backtrace_symbols(callstack, frames); for (i = 0; i < frames; ++i) { - std::cout << strs[i] << std::endl; + std::cout << strs[i] << "\n"; } free(strs); # endif @@ -79,13 +79,13 @@ namespace OFX { void throwHostMissingSuiteException(std::string name) { # ifdef DEBUG - std::cout << "Threw suite exception! Host missing '" << name << "' suite." << std::endl; + std::cout << "Threw suite exception! Host missing '" << name << "' suite." << "\n"; # if defined(__APPLE__) || defined(linux) void* callstack[128]; int i, frames = backtrace(callstack, 128); char** strs = backtrace_symbols(callstack, frames); for (i = 0; i < frames; ++i) { - std::cout << strs[i] << std::endl; + std::cout << strs[i] << "\n"; } free(strs); # endif diff --git a/vendor/openfx/Support/Library/ofxsImageEffect.cpp b/vendor/openfx/Support/Library/ofxsImageEffect.cpp index 2c0bc23c63..db4e910272 100644 --- a/vendor/openfx/Support/Library/ofxsImageEffect.cpp +++ b/vendor/openfx/Support/Library/ofxsImageEffect.cpp @@ -2788,7 +2788,7 @@ namespace OFX { catch (const OFX::Exception::Suite &ex) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::Suite: " << ex.what() << std::endl; + std::cout << "Caught OFX::Exception::Suite: " << ex.what() << "\n"; # endif stat = ex.status(); } @@ -2797,7 +2797,7 @@ namespace OFX { catch (const OFX::Exception::HostInadequate &e) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::HostInadequate: " << e.what() << std::endl; + std::cout << "Caught OFX::Exception::HostInadequate: " << e.what() << "\n"; # endif stat = kOfxStatErrMissingHostFeature; } @@ -2806,7 +2806,7 @@ namespace OFX { catch (const OFX::Exception::PropertyUnknownToHost &e) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::PropertyUnknownToHost: " << e.what() << std::endl; + std::cout << "Caught OFX::Exception::PropertyUnknownToHost: " << e.what() << "\n"; # endif stat = kOfxStatErrMissingHostFeature; } @@ -2828,14 +2828,14 @@ namespace OFX { catch (const std::exception &e) { # ifdef DEBUG - std::cout << "Caught exception: " << e.what() << std::endl; + std::cout << "Caught exception: " << e.what() << "\n"; # endif stat = kOfxStatFailed; } catch (...) { # ifdef DEBUG - std::cout << "Caught Unknown exception" << std::endl; + std::cout << "Caught Unknown exception\n"; # endif stat = kOfxStatFailed; } @@ -2886,7 +2886,7 @@ namespace OFX { catch (OFX::Exception::Suite &ex) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::Suite" << std::endl; + std::cout << "Caught OFX::Exception::Suite\n"; # endif stat = ex.status(); } @@ -2895,7 +2895,7 @@ namespace OFX { catch (OFX::Exception::HostInadequate &) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::HostInadequate" << std::endl; + std::cout << "Caught OFX::Exception::HostInadequate\n"; # endif stat = kOfxStatErrMissingHostFeature; } @@ -2904,7 +2904,7 @@ namespace OFX { catch (OFX::Exception::PropertyUnknownToHost &) { # ifdef DEBUG - std::cout << "Caught OFX::Exception::PropertyUnknownToHost" << std::endl; + std::cout << "Caught OFX::Exception::PropertyUnknownToHost\n"; # endif stat = kOfxStatErrMissingHostFeature; } @@ -2926,7 +2926,7 @@ namespace OFX { catch (...) { # ifdef DEBUG - std::cout << "Caught Unknown exception" << std::endl; + std::cout << "Caught Unknown exception\n"; # endif stat = kOfxStatFailed; }