[Bf-blender-cvs] [05a97536b91] cycles_embree: Cycles: fixed some warnings in embree integration

Stefan Werner noreply at git.blender.org
Sun Nov 26 23:11:21 CET 2017


Commit: 05a97536b9165accb9cb450798aa6dab3407f153
Author: Stefan Werner
Date:   Tue Jun 27 10:25:23 2017 +0200
Branches: cycles_embree
https://developer.blender.org/rB05a97536b9165accb9cb450798aa6dab3407f153

Cycles: fixed some warnings in embree integration

===================================================================

M	intern/cycles/bvh/bvh_embree.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
index 9108d418348..e27aea50f6d 100644
--- a/intern/cycles/bvh/bvh_embree.cpp
+++ b/intern/cycles/bvh/bvh_embree.cpp
@@ -50,7 +50,9 @@ CCL_NAMESPACE_BEGIN
  * Cycles' own BVH does that directly inside the traversal calls.
  */
 
-void rtc_filter_func(void* userDataPtr, RTCRay& ray_)
+
+void rtc_filter_func(void*, RTCRay& ray_);
+void rtc_filter_func(void*, RTCRay& ray_)
 {
 	CCLRay &ray = (CCLRay&)ray_;
 	KernelGlobals *kg = ray.kg;
@@ -147,8 +149,8 @@ void rtc_filter_func(void* userDataPtr, RTCRay& ray_)
 
 	return;
 }
-
-bool rtc_memory_monitor_func(void* userPtr, const ssize_t bytes, const bool post)
+bool rtc_memory_monitor_func(void* userPtr, const ssize_t bytes, const bool post);
+bool rtc_memory_monitor_func(void* userPtr, const ssize_t bytes, const bool)
 {
 	BVHEmbree *bvh = (BVHEmbree*)userPtr;
 	if(bvh) {
@@ -159,6 +161,7 @@ bool rtc_memory_monitor_func(void* userPtr, const ssize_t bytes, const bool post
 
 static double progress_start_time = 0.0f;
 
+bool rtc_progress_func(void* user_ptr, const double n);
 bool rtc_progress_func(void* user_ptr, const double n)
 {
 	Progress *progress = (Progress*)user_ptr;
@@ -180,7 +183,7 @@ int BVHEmbree::rtc_shared_users = 0;
 thread_mutex BVHEmbree::rtc_shared_mutex;
 
 BVHEmbree::BVHEmbree(const BVHParams& params_, const vector<Object*>& objects_)
-: BVH(params_, objects_), scene(NULL), mem_used(0), stats(NULL), top_level(NULL)
+: BVH(params_, objects_), scene(NULL), mem_used(0), top_level(NULL), stats(NULL)
 {
 	_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
 	_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
@@ -272,24 +275,22 @@ void BVHEmbree::build(Progress& progress, Stats *stats_)
 	pack.object_node.clear();
 
 	foreach(Object *ob, objects) {
-		unsigned geom_id;
-
 		if(params.top_level) {
 			if(!ob->is_traceable()) {
 				++i;
 				continue;
 			}
-			if(!ob->mesh->is_instanced())
-				geom_id = add_object(ob, i);
-			else
-				geom_id = add_instance(ob, i);
-
+			if(!ob->mesh->is_instanced()) {
+				add_object(ob, i);
+			}
+			else {
+				add_instance(ob, i);
+			}
 		}
-		else
-			geom_id = add_object(ob, i);
-
-		i++;
-
+		else {
+			add_object(ob, i);
+		}
+		++i;
 		if(progress.get_cancel()) return;
 	}
 
@@ -620,7 +621,7 @@ unsigned BVHEmbree::add_curves(Mesh *mesh, int i)
 	return geom_id;
 }
 
-void BVHEmbree::pack_nodes(const BVHNode *root)
+void BVHEmbree::pack_nodes(const BVHNode *)
 {
 	if(!params.top_level) {
 		return;



More information about the Bf-blender-cvs mailing list