On 01/23/2013 12:35 PM, Carl Worth wrote:
Ian Romanick <[email protected]> writes:
+bool
+link_uniform_blocks_are_compatible(const gl_uniform_block *a,
+                                  const gl_uniform_block *b)
+{
+   assert(strcmp(a->Name, b->Name) == 0);
...
+      if (strcmp(old_block->Name, new_block->Name) == 0)
+        return link_uniform_blocks_are_compatible(old_block, new_block)
+           ? i : -1;

Moving the strcmp to the body of the function, (it's there
already---just need to replace the assert with "if(strcmp(a,b)) return
false;"), would give a less fragile interface here.

But that's functionally different. I only want to call link_uniform_blocks_are_compatible if the from one list is found in the other. If the names match but the blocks are not compatible, it is an error. So, there's three possible states (not found, matching, not matching).

With that:

Reviewed-by: Carl Worth <[email protected]>

-Carl


_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to