mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
tools: Convert NULL to nullptr (see issue #2861)
This commit is contained in:
@ -1586,11 +1586,12 @@ class obj_argument:
|
|||||||
return 'CefString()'
|
return 'CefString()'
|
||||||
elif type == 'refptr_same' or type == 'refptr_diff' or \
|
elif type == 'refptr_same' or type == 'refptr_diff' or \
|
||||||
type == 'rawptr_same' or type == 'rawptr_diff':
|
type == 'rawptr_same' or type == 'rawptr_diff':
|
||||||
|
if for_capi:
|
||||||
return 'NULL'
|
return 'NULL'
|
||||||
|
return 'nullptr'
|
||||||
elif type == 'ownptr_same' or type == 'ownptr_diff':
|
elif type == 'ownptr_same' or type == 'ownptr_diff':
|
||||||
if for_capi:
|
if for_capi:
|
||||||
return 'NULL'
|
return 'NULL'
|
||||||
else:
|
|
||||||
return 'CefOwnPtr<' + self.type.get_ptr_type() + '>()'
|
return 'CefOwnPtr<' + self.type.get_ptr_type() + '>()'
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
@ -375,7 +375,7 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped):
|
|||||||
'\n *'+arg_name+' = '+assign+';'\
|
'\n *'+arg_name+' = '+assign+';'\
|
||||||
'\n }'\
|
'\n }'\
|
||||||
'\n } else {'\
|
'\n } else {'\
|
||||||
'\n *'+arg_name+' = NULL;'\
|
'\n *'+arg_name+' = nullptr;'\
|
||||||
'\n }'\
|
'\n }'\
|
||||||
'\n }'
|
'\n }'
|
||||||
elif arg_type == 'string_vec_byref':
|
elif arg_type == 'string_vec_byref':
|
||||||
@ -643,13 +643,13 @@ def make_cpptoc_class_impl(header, clsname, impl):
|
|||||||
'template<> CefRawPtr<'+clsname+'> '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, '+capiname+'* s) {\n' + \
|
'template<> CefRawPtr<'+clsname+'> '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, '+capiname+'* s) {\n' + \
|
||||||
unwrapderived[1] + \
|
unwrapderived[1] + \
|
||||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||||
' return NULL;\n'+ \
|
' return nullptr;\n'+ \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
else:
|
else:
|
||||||
const += 'template<> CefRefPtr<'+clsname+'> '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+capiname+'* s) {\n' + \
|
const += 'template<> CefRefPtr<'+clsname+'> '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+capiname+'* s) {\n' + \
|
||||||
unwrapderived + \
|
unwrapderived + \
|
||||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||||
' return NULL;\n'+ \
|
' return nullptr;\n'+ \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
|
|
||||||
const += 'template<> CefWrapperType ' + parent_sig + '::kWrapperType = ' + get_wrapper_type_enum(
|
const += 'template<> CefWrapperType ' + parent_sig + '::kWrapperType = ' + get_wrapper_type_enum(
|
||||||
|
@ -388,7 +388,7 @@ def make_ctocpp_function_impl_new(clsname, name, func, base_scoped):
|
|||||||
'\n '+arg_name+' = '+assign+';'\
|
'\n '+arg_name+' = '+assign+';'\
|
||||||
'\n }'\
|
'\n }'\
|
||||||
'\n } else {'\
|
'\n } else {'\
|
||||||
'\n '+arg_name+' = NULL;'\
|
'\n '+arg_name+' = nullptr;'\
|
||||||
'\n }'
|
'\n }'
|
||||||
elif arg_type == 'string_vec_byref':
|
elif arg_type == 'string_vec_byref':
|
||||||
result += comment+\
|
result += comment+\
|
||||||
@ -635,18 +635,18 @@ def make_ctocpp_class_impl(header, clsname, impl):
|
|||||||
const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedOwn(CefWrapperType type, CefOwnPtr<'+clsname+'> c) {\n'+ \
|
const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedOwn(CefWrapperType type, CefOwnPtr<'+clsname+'> c) {\n'+ \
|
||||||
unwrapderived[0] + \
|
unwrapderived[0] + \
|
||||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||||
' return NULL;\n'+ \
|
' return nullptr;\n'+ \
|
||||||
'}\n\n' + \
|
'}\n\n' + \
|
||||||
'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, CefRawPtr<'+clsname+'> c) {\n'+ \
|
'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, CefRawPtr<'+clsname+'> c) {\n'+ \
|
||||||
unwrapderived[1] + \
|
unwrapderived[1] + \
|
||||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||||
' return NULL;\n'+ \
|
' return nullptr;\n'+ \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
else:
|
else:
|
||||||
const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+clsname+'* c) {\n'+ \
|
const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+clsname+'* c) {\n'+ \
|
||||||
unwrapderived + \
|
unwrapderived + \
|
||||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||||
' return NULL;\n'+ \
|
' return nullptr;\n'+ \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
|
|
||||||
const += 'template<> CefWrapperType ' + parent_sig + '::kWrapperType = ' + get_wrapper_type_enum(
|
const += 'template<> CefWrapperType ' + parent_sig + '::kWrapperType = ' + get_wrapper_type_enum(
|
||||||
|
@ -125,7 +125,7 @@ def make_libcef_dll_dylib_impl(header):
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void* g_libcef_handle = NULL;
|
void* g_libcef_handle = nullptr;
|
||||||
|
|
||||||
void* libcef_get_ptr(const char* path, const char* name) {
|
void* libcef_get_ptr(const char* path, const char* name) {
|
||||||
void* ptr = dlsym(g_libcef_handle, name);
|
void* ptr = dlsym(g_libcef_handle, name);
|
||||||
@ -179,7 +179,7 @@ int cef_unload_library() {
|
|||||||
if (!result) {
|
if (!result) {
|
||||||
fprintf(stderr, "dlclose: %s\\n", dlerror());
|
fprintf(stderr, "dlclose: %s\\n", dlerror());
|
||||||
}
|
}
|
||||||
g_libcef_handle = NULL;
|
g_libcef_handle = nullptr;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user