Cleanup: fewer iostreams related includes in Cycles

In the commonly used cycles headers, it's enough to include
much smaller <iosfwd> than the full <iostream>. While looking at it,
removed inclusion of some other headers from commonly used headers,
that seemed to not be needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/111063
This commit is contained in:
Aras Pranckevicius 2023-08-12 10:52:56 +03:00 committed by Gitea
parent 4b98c0aa24
commit 7875074532
11 changed files with 7 additions and 14 deletions

@ -12,7 +12,6 @@
#include "util/map.h"
#include "util/set.h"
#include "util/vector.h"
CCL_NAMESPACE_BEGIN

@ -9,6 +9,7 @@
#define __BVH_PARAMS_H__
#include "util/boundbox.h"
#include "util/vector.h"
#include "kernel/types.h"

@ -9,7 +9,7 @@
# include "util/string.h"
# include <ostream> // NOLINT
# include <iosfwd>
#endif
CCL_NAMESPACE_BEGIN

@ -4,7 +4,7 @@
#pragma once
#include <ostream>
#include <iosfwd>
#include "util/types.h"

@ -704,7 +704,7 @@ OSLCompiler::OSLCompiler(OSLShaderManager *manager, OSL::ShadingSystem *ss, Scen
string OSLCompiler::id(ShaderNode *node)
{
/* assign layer unique name based on pointer address + bump mode */
stringstream stream;
std::stringstream stream;
/* Ensure that no grouping characters (e.g. commas with en_US locale)
* are added to the pointer string. */
@ -1205,7 +1205,7 @@ OSL::ShaderGroupRef OSLCompiler::compile_type(Shader *shader, ShaderGraph *graph
current_type = type;
/* Use name hash to identify shader group to avoid issues with non-alphanumeric characters */
stringstream name;
std::stringstream name;
name.imbue(std::locale("C"));
name << "shader_" << shader->name.hash();

@ -4,7 +4,7 @@
#pragma once
#include <ostream> // NOLINT
#include <iosfwd>
#include "util/string.h"
#include "util/vector.h"

@ -14,7 +14,6 @@
#include "util/param.h"
#include "util/string.h"
#include "util/system.h"
#include "util/texture.h"
#include "util/thread.h"

@ -9,7 +9,6 @@
#include <math.h>
#include "util/math.h"
#include "util/string.h"
#include "util/transform.h"
#include "util/types.h"

@ -6,7 +6,6 @@
#define __UTIL_DEBUG_H__
#include <cassert>
#include <iostream>
#include "bvh/params.h"

@ -10,7 +10,7 @@
# include <glog/logging.h>
#endif
#include <iostream>
#include <iosfwd>
CCL_NAMESPACE_BEGIN

@ -4,7 +4,6 @@
#pragma once
#include <sstream>
#include <string.h>
#include <string>
@ -17,10 +16,7 @@
CCL_NAMESPACE_BEGIN
using std::istringstream;
using std::ostringstream;
using std::string;
using std::stringstream;
using std::to_string;
using OIIO::string_view;