fix: modernize-avoid-c-arrays (#44813)
use string_view for constants used in methods that take string_view args
This commit is contained in:
parent
024fee4e44
commit
3c941c7e8f
11 changed files with 69 additions and 62 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "electron/shell/renderer/electron_api_service_impl.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
@ -32,7 +33,7 @@ namespace electron {
|
|||
|
||||
namespace {
|
||||
|
||||
const char kIpcKey[] = "ipcNative";
|
||||
constexpr std::string_view kIpcKey = "ipcNative";
|
||||
|
||||
// Gets the private object under kIpcKey
|
||||
v8::Local<v8::Object> GetIpcObject(v8::Local<v8::Context> context) {
|
||||
|
|
|
@ -33,8 +33,8 @@ namespace electron {
|
|||
|
||||
namespace {
|
||||
|
||||
const char kEmitProcessEventKey[] = "emit-process-event";
|
||||
const char kBindingCacheKey[] = "native-binding-cache";
|
||||
constexpr std::string_view kEmitProcessEventKey = "emit-process-event";
|
||||
constexpr std::string_view kBindingCacheKey = "native-binding-cache";
|
||||
|
||||
v8::Local<v8::Object> GetBindingCache(v8::Isolate* isolate) {
|
||||
auto context = isolate->GetCurrentContext();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue