[Bf-blender-cvs] [d0246d5] master: Cycles: Some cleanup, should be no functional changes
Sergey Sharybin
noreply at git.blender.org
Tue Feb 16 15:33:31 CET 2016
Commit: d0246d5f301c0af8af9ccfbfe135cfbe034deca9
Author: Sergey Sharybin
Date: Tue Feb 16 15:32:26 2016 +0100
Branches: master
https://developer.blender.org/rBd0246d5f301c0af8af9ccfbfe135cfbe034deca9
Cycles: Some cleanup, should be no functional changes
Addressing meaningful feedback from coverity.
===================================================================
M intern/cycles/blender/blender_shader.cpp
M intern/cycles/util/util_aligned_malloc.cpp
M intern/cycles/util/util_path.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index bce65d0..4f7ca30 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -78,7 +78,7 @@ static int validate_enum_value(int value, int num_values, int default_value)
}
template<typename NodeType>
-static InterpolationType get_image_interpolation(NodeType b_node)
+static InterpolationType get_image_interpolation(NodeType& b_node)
{
int value = b_node.interpolation();
return (InterpolationType)validate_enum_value(value,
@@ -87,7 +87,7 @@ static InterpolationType get_image_interpolation(NodeType b_node)
}
template<typename NodeType>
-static ExtensionType get_image_extension(NodeType b_node)
+static ExtensionType get_image_extension(NodeType& b_node)
{
int value = b_node.extension();
return (ExtensionType)validate_enum_value(value,
diff --git a/intern/cycles/util/util_aligned_malloc.cpp b/intern/cycles/util/util_aligned_malloc.cpp
index b161a55..15d2eb3 100644
--- a/intern/cycles/util/util_aligned_malloc.cpp
+++ b/intern/cycles/util/util_aligned_malloc.cpp
@@ -44,8 +44,7 @@ void *util_aligned_malloc(size_t size, int alignment)
{
#ifdef WITH_BLENDER_GUARDEDALLOC
return MEM_mallocN_aligned(size, alignment, "Cycles Aligned Alloc");
-#endif
-#ifdef _WIN32
+#elif defined(_WIN32)
return _aligned_malloc(size, alignment);
#elif defined(__APPLE__)
/* On Mac OS X, both the heap and the stack are guaranteed 16-byte aligned so
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index db3891e..389bb46 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -178,7 +178,8 @@ public:
class path_info {
public:
path_info(const string& path)
- : path_(path)
+ : path_(path),
+ entry_(NULL)
{
}
More information about the Bf-blender-cvs
mailing list