[Bf-blender-cvs] [b428780] master: Cycles: Make Clang 3.6 happy with const debug flags reference

Sergey Sharybin noreply at git.blender.org
Sat Jan 23 21:52:29 CET 2016


Commit: b42878012cc20d1031bdf6765912d77866b26ad6
Author: Sergey Sharybin
Date:   Sun Jan 24 01:33:53 2016 +0500
Branches: master
https://developer.blender.org/rBb42878012cc20d1031bdf6765912d77866b26ad6

Cycles: Make Clang 3.6 happy with const debug flags reference

For some reason it did not like the explicit const qualifier for a
custom type.

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

M	intern/cycles/util/util_debug.cpp
M	intern/cycles/util/util_debug.h

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

diff --git a/intern/cycles/util/util_debug.cpp b/intern/cycles/util/util_debug.cpp
index 0f3862a..448c622 100644
--- a/intern/cycles/util/util_debug.cpp
+++ b/intern/cycles/util/util_debug.cpp
@@ -114,7 +114,7 @@ void DebugFlags::reset()
 }
 
 std::ostream& operator <<(std::ostream &os,
-                          const DebugFlagsRef debug_flags)
+                          DebugFlagsConstRef debug_flags)
 {
 	os << "CPU flags:\n"
 	   << "  AVX2   : " << string_from_bool(debug_flags.cpu.avx2)  << "\n"
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h
index 723d4a0..6ec5188 100644
--- a/intern/cycles/util/util_debug.h
+++ b/intern/cycles/util/util_debug.h
@@ -125,13 +125,14 @@ private:
 };
 
 typedef DebugFlags& DebugFlagsRef;
+typedef const DebugFlags& DebugFlagsConstRef;
 
 inline DebugFlags& DebugFlags() {
   return DebugFlags::get();
 }
 
 std::ostream& operator <<(std::ostream &os,
-                          const DebugFlagsRef debug_flags);
+                          DebugFlagsConstRef debug_flags);
 
 CCL_NAMESPACE_END




More information about the Bf-blender-cvs mailing list