mem_tracker: Use dispatch access functions
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Sun, 14 Jun 2015 03:39:35 +0000 (21:39 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 18 Jun 2015 16:22:56 +0000 (10:22 -0600)
Hopefully makes code easier to read when using the
dispatch table access functions.

layers/mem_tracker.cpp

index 4c6d700cdb94179fddb0ae1b292ba56f0a979ea2..1b22df7a92de7a0b0cc0ee4bfed5366cd6377563 100644 (file)
@@ -76,13 +76,15 @@ template layer_data *get_my_data_ptr<layer_data>(
 
 debug_report_data *mdd(VkObject object)
 {
-    layer_data *my_data = get_my_data_ptr(get_dispatch_key(object), layer_data_map);
+    dispatch_key key = get_dispatch_key(object);
+    layer_data *my_data = get_my_data_ptr(key, layer_data_map);
     assert(my_data->report_data != NULL);
     return my_data->report_data;
 }
 
 debug_report_data *mid(VkInstance object)
 {
+    dispatch_key key = get_dispatch_key(object);
     layer_data *my_data = get_my_data_ptr(get_dispatch_key(object), layer_data_map);
     assert(my_data->report_data != NULL);
     return my_data->report_data;