Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
420422d
Remove unused include <pystring.h>
KevinJW Jan 13, 2026
0adf067
Clean up SectionMerger.cpp includes
KevinJW Jan 13, 2026
b12934d
Tidy up placement of <limits> header inclusion
KevinJW Jan 13, 2026
d6a6a07
fstream include tidy up
KevinJW Jan 13, 2026
e20712e
Minimise <iostream> inclusions
KevinJW Jan 13, 2026
eab529c
Remove unused PrivateTypes includes
KevinJW Jan 13, 2026
fde9068
Tidy up <sstream> usage
KevinJW Jan 14, 2026
4b4fdaa
Reduce usage of "OCIOZArchive.h"
KevinJW Jan 14, 2026
9cc80f8
Tidy "XMLReaderUtils.h"
KevinJW Jan 14, 2026
f25fa3a
Clean up MatrixOp.h usage
KevinJW Jan 14, 2026
5ae0330
Tidy up <string.h>/<cstring>
KevinJW Jan 14, 2026
20d5ac4
claen up includes for apps
KevinJW Jan 15, 2026
9b9619b
Tidy system headers for bindings and app helpers
KevinJW Jan 15, 2026
0d6ee63
Add a number of system includes
KevinJW Jan 15, 2026
8daaae2
Start unpicking by removing unneeded OCIO internal includes
KevinJW Jan 15, 2026
1f6a871
More missing includes
KevinJW Jan 15, 2026
0fd325c
Reduce dependency on BitDepthUtils.h , prefer cmath over math.h
KevinJW Jan 15, 2026
747ade0
Fix Imath include for case sensitive OS's
KevinJW Jan 15, 2026
e43df6a
Switch some std::endl -> "\n" (reduces need for <iostream>)
KevinJW Jan 15, 2026
1e7fa00
Further removal or std::endl
KevinJW Jan 16, 2026
0362a9d
remove unneccessary continuation characters
KevinJW Jan 16, 2026
040eed5
More std::endl removal
KevinJW Jan 16, 2026
4261c80
More continuation character removal
KevinJW Jan 16, 2026
f8885a0
std::endl removal
KevinJW Jan 16, 2026
ef8d8de
Minimise StringUtils.h usage
KevinJW Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/concepts/overview/internal_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Example:
}
catch(OCIO::Exception & exception)
{
std::cerr << "OpenColorIO Error: " << exception.what() << std::endl;
std::cerr << "OpenColorIO Error: " << exception.what() << "\n";
}
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/developing/usage_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/OpenColorIO/OpenColorIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include <limits>
#include <stdexcept>
#include <string>
#include <fstream>
#include <vector>
#include <cstdint>
#include <map>
#include <functional>

#include "OpenColorABI.h"
#include "OpenColorTypes.h"
Expand Down Expand Up @@ -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";
}

*/
Expand Down
1 change: 0 additions & 1 deletion include/OpenColorIO/OpenColorTransforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define INCLUDED_OCIO_OPENCOLORTRANSFORMS_H

#include <initializer_list>
#include <limits>

#include "OpenColorTypes.h"

Expand Down
1 change: 0 additions & 1 deletion include/OpenColorIO/OpenColorTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#endif

#include <array>
#include <limits>
#include <string>
#include <functional>

Expand Down
6 changes: 4 additions & 2 deletions src/OpenColorIO/Baker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// Copyright Contributors to the OpenColorIO Project.


#include <iostream>
#include <ostream>
#include <sstream>
#include <string>
#include <exception>

#include <OpenColorIO/OpenColorIO.h>

#include "transforms/FileTransform.h"
#include "BakingUtils.h"
#include "MathUtils.h"


namespace OCIO_NAMESPACE
Expand Down
3 changes: 3 additions & 0 deletions src/OpenColorIO/BakingUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.

#include <string>
#include <algorithm>

#include "BakingUtils.h"

namespace OCIO_NAMESPACE
Expand Down
2 changes: 2 additions & 0 deletions src/OpenColorIO/BitDepthUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright Contributors to the OpenColorIO Project.


#include <string>

#include <OpenColorIO/OpenColorIO.h>

#include "BitDepthUtils.h"
Expand Down
4 changes: 2 additions & 2 deletions src/OpenColorIO/CPUInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@


#include "CPUInfo.h"
#include <string.h>
#include <cstring>

#if _WIN32
#include <limits.h>
#include <intrin.h>
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
#else
#include <stdint.h>
#include <cstdint>
#endif

namespace OCIO_NAMESPACE
Expand Down
6 changes: 3 additions & 3 deletions src/OpenColorIO/CPUProcessor.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.

#include <string.h>
#include <cstring>
#include <sstream>
#include <memory>

#include <OpenColorIO/OpenColorIO.h>

#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"


Expand Down
13 changes: 6 additions & 7 deletions src/OpenColorIO/ColorSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@

#include <cstring>
#include <sstream>
#include <ostream>
#include <vector>
#include <array>
#include <map>
#include <algorithm>

#include <OpenColorIO/OpenColorIO.h>

#include "TokensManager.h"
#include "Platform.h"
#include "PrivateTypes.h"
#include "utils/StringUtils.h"


Expand Down Expand Up @@ -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());
}

Expand All @@ -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());
}

Expand All @@ -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());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenColorIO/ColorSpaceSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include <sstream>
#include <string>
#include <vector>

#include <OpenColorIO/OpenColorIO.h>

#include "PrivateTypes.h"
#include "utils/StringUtils.h"


Expand Down
18 changes: 8 additions & 10 deletions src/OpenColorIO/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
#include <vector>
#include <regex>
#include <functional>
#include <algorithm>
#include <exception>

#include <pystring.h>

#include <OpenColorIO/OpenColorIO.h>

#include "builtinconfigs/BuiltinConfigRegistry.h"
#include "ConfigUtils.h"
#include "ContextVariableUtils.h"
#include "Display.h"
Expand All @@ -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"
Expand Down Expand Up @@ -155,15 +153,15 @@ void GetFileReferences(std::set<std::string> & files, const ConstTransformRcPtr
{
if(!transform) return;

if(ConstGroupTransformRcPtr groupTransform = \
if(ConstGroupTransformRcPtr groupTransform =
DynamicPtrCast<const GroupTransform>(transform))
{
for(int i=0; i<groupTransform->getNumTransforms(); ++i)
{
GetFileReferences(files, groupTransform->getTransform(i));
}
}
else if(ConstFileTransformRcPtr fileTransform = \
else if(ConstFileTransformRcPtr fileTransform =
DynamicPtrCast<const FileTransform>(transform))
{
files.insert(fileTransform->getSrc());
Expand All @@ -179,26 +177,26 @@ void GetColorSpaceReferences(std::set<std::string> & colorSpaceNames,
{
if(!transform) return;

if(ConstGroupTransformRcPtr groupTransform = \
if(ConstGroupTransformRcPtr groupTransform =
DynamicPtrCast<const GroupTransform>(transform))
{
for(int i=0; i<groupTransform->getNumTransforms(); ++i)
{
GetColorSpaceReferences(colorSpaceNames, groupTransform->getTransform(i), context);
}
}
else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = \
else if(ConstColorSpaceTransformRcPtr colorSpaceTransform =
DynamicPtrCast<const ColorSpaceTransform>(transform))
{
colorSpaceNames.insert(context->resolveStringVar(colorSpaceTransform->getSrc()));
colorSpaceNames.insert(context->resolveStringVar(colorSpaceTransform->getDst()));
}
else if(ConstDisplayViewTransformRcPtr displayViewTransform = \
else if(ConstDisplayViewTransformRcPtr displayViewTransform =
DynamicPtrCast<const DisplayViewTransform>(transform))
{
colorSpaceNames.insert(displayViewTransform->getSrc());
}
else if(ConstLookTransformRcPtr lookTransform = \
else if(ConstLookTransformRcPtr lookTransform =
DynamicPtrCast<const LookTransform>(transform))
{
colorSpaceNames.insert(lookTransform->getSrc());
Expand Down
6 changes: 5 additions & 1 deletion src/OpenColorIO/ConfigUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.

#include <string>
#include <sstream>
#include <vector>
#include <cmath>

#include <pystring.h>

#include "ConfigUtils.h"
#include "MathUtils.h"
#include "utils/StringUtils.h"
#include "Logging.h"

namespace OCIO_NAMESPACE
{
Expand Down
2 changes: 2 additions & 0 deletions src/OpenColorIO/ConfigUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ifndef INCLUDED_OCIO_CONFIG_UTILS_H
#define INCLUDED_OCIO_CONFIG_UTILS_H

#include <vector>

#include <OpenColorIO/OpenColorIO.h>

namespace OCIO_NAMESPACE
Expand Down
5 changes: 2 additions & 3 deletions src/OpenColorIO/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// Copyright Contributors to the OpenColorIO Project.

#include <cstring>
#include <iostream>
#include <ostream>
#include <map>
#include <utility>
#include <sstream>
#include <string>

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/OpenColorIO/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright Contributors to the OpenColorIO Project.

#include <string>
#include <algorithm>

#include <OpenColorIO/OpenColorIO.h>

Expand Down
2 changes: 1 addition & 1 deletion src/OpenColorIO/Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

#include <string>
#include <vector>
#include <utility>

#include <OpenColorIO/OpenColorIO.h>

#include "Platform.h"
#include "PrivateTypes.h"
#include "utils/StringUtils.h"


Expand Down
2 changes: 2 additions & 0 deletions src/OpenColorIO/Exception.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.

#include <stdexcept>

#include <OpenColorIO/OpenColorIO.h>

namespace OCIO_NAMESPACE
Expand Down
3 changes: 1 addition & 2 deletions src/OpenColorIO/FileRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <algorithm>
#include <cctype>
#include <cstring>
#include <map>
#include <regex>
#include <sstream>

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/OpenColorIO/FileRules.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef INCLUDED_OCIO_FILERULES_H
#define INCLUDED_OCIO_FILERULES_H

#include <functional>
#include <vector>

#include <OpenColorIO/OpenColorIO.h>

Expand Down
Loading
Loading