@@ -377,7 +377,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
377
377
[](struct dl_phdr_info * info, size_t size, void * data) {
378
378
auto list = static_cast <std::vector<std::string>*>(data);
379
379
if (*info->dlpi_name != ' \0 ' ) {
380
- list->push_back (info->dlpi_name );
380
+ list->emplace_back (info->dlpi_name );
381
381
}
382
382
return 0 ;
383
383
},
@@ -386,7 +386,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
386
386
uint32_t i = 0 ;
387
387
for (const char * name = _dyld_get_image_name (i); name != nullptr ;
388
388
name = _dyld_get_image_name (++i)) {
389
- list.push_back (name);
389
+ list.emplace_back (name);
390
390
}
391
391
392
392
#elif _AIX
@@ -411,10 +411,10 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
411
411
strlen (cur_info->ldinfo_filename ) + 1 ;
412
412
if (*member_name != ' \0 ' ) {
413
413
str << cur_info->ldinfo_filename << " (" << member_name << " )" ;
414
- list.push_back (str.str ());
414
+ list.emplace_back (str.str ());
415
415
str.str (" " );
416
416
} else {
417
- list.push_back (cur_info->ldinfo_filename );
417
+ list.emplace_back (cur_info->ldinfo_filename );
418
418
}
419
419
buf += cur_info->ldinfo_next ;
420
420
} while (cur_info->ldinfo_next != 0 );
@@ -424,7 +424,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
424
424
425
425
if (dlinfo (RTLD_SELF, RTLD_DI_LINKMAP, &p) != -1 ) {
426
426
for (Link_map* l = p; l != nullptr ; l = l->l_next ) {
427
- list.push_back (l->l_name );
427
+ list.emplace_back (l->l_name );
428
428
}
429
429
}
430
430
@@ -459,7 +459,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
459
459
char * str = new char [size];
460
460
WideCharToMultiByte (
461
461
CP_UTF8, 0 , module_name, -1 , str, size, nullptr , nullptr );
462
- list.push_back (str);
462
+ list.emplace_back (str);
463
463
}
464
464
}
465
465
}
0 commit comments