Browse Source

refactor: remove unnecessary template type in EmitEvent()

Charles Kerr 6 months ago
parent
commit
6ece9a60d9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      shell/common/gin_helper/event_emitter_caller.h

+ 2 - 2
shell/common/gin_helper/event_emitter_caller.h

@@ -25,10 +25,10 @@ v8::Local<v8::Value> CallMethodWithArgs(v8::Isolate* isolate,
 
 // obj.emit(name, args...);
 // The caller is responsible of allocating a HandleScope.
-template <typename StringType, typename... Args>
+template <typename... Args>
 v8::Local<v8::Value> EmitEvent(v8::Isolate* isolate,
                                v8::Local<v8::Object> obj,
-                               const StringType& name,
+                               const std::string_view name,
                                Args&&... args) {
   v8::EscapableHandleScope scope{isolate};
   std::array<v8::Local<v8::Value>, 1U + sizeof...(args)> converted_args = {