Return empty string instead of null
authorMichael Lentine <mlentine@google.com>
Fri, 23 Oct 2015 19:40:50 +0000 (12:40 -0700)
committerMichael Lentine <mlentine@google.com>
Fri, 23 Oct 2015 19:42:44 +0000 (12:42 -0700)
vk_helper.py

index 0112087..f44beb2 100755 (executable)
@@ -1020,7 +1020,7 @@ class StructWrapperGen:
         sh_funcs.append("string dynamic_display(const void* pStruct, const string prefix)\n{")
         sh_funcs.append("    // Cast to APP_INFO ptr initially just to pull sType off struct")
         sh_funcs.append("    if (pStruct == NULL) {\n")
-        sh_funcs.append("        return NULL;")
+        sh_funcs.append("        return string();")
         sh_funcs.append("    }\n")
         sh_funcs.append("    VkStructureType sType = ((VkApplicationInfo*)pStruct)->sType;")
         sh_funcs.append('    string indent = "    ";')
@@ -1037,7 +1037,7 @@ class StructWrapperGen:
                     sh_funcs.append('        }')
                     sh_funcs.append('        break;')
                 sh_funcs.append("        default:")
-                sh_funcs.append("        return NULL;")
+                sh_funcs.append("        return string();")
         sh_funcs.append('%s' % lineinfo.get())
         sh_funcs.append("    }")
         sh_funcs.append("}")