fix: modernize-use-using clang-tidy warnings (#44835)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
a30cf5b551
commit
d8a7c57506
4 changed files with 48 additions and 52 deletions
|
@ -91,15 +91,14 @@ namespace electron::api {
|
||||||
// FrameTreeNodeId -> WebFrameMain*
|
// FrameTreeNodeId -> WebFrameMain*
|
||||||
// Using FrameTreeNode allows us to track frame across navigations. This
|
// Using FrameTreeNode allows us to track frame across navigations. This
|
||||||
// is most similar to how <iframe> works.
|
// is most similar to how <iframe> works.
|
||||||
typedef std::unordered_map<content::FrameTreeNodeId,
|
using FrameTreeNodeIdMap = std::unordered_map<content::FrameTreeNodeId,
|
||||||
WebFrameMain*,
|
WebFrameMain*,
|
||||||
content::FrameTreeNodeId::Hasher>
|
content::FrameTreeNodeId::Hasher>;
|
||||||
FrameTreeNodeIdMap;
|
|
||||||
|
|
||||||
// Token -> WebFrameMain*
|
// Token -> WebFrameMain*
|
||||||
// Maps exact RFH to a WebFrameMain instance.
|
// Maps exact RFH to a WebFrameMain instance.
|
||||||
typedef std::map<content::GlobalRenderFrameHostToken, WebFrameMain*>
|
using FrameTokenMap =
|
||||||
FrameTokenMap;
|
std::map<content::GlobalRenderFrameHostToken, WebFrameMain*>;
|
||||||
|
|
||||||
FrameTreeNodeIdMap& GetFrameTreeNodeIdMap() {
|
FrameTreeNodeIdMap& GetFrameTreeNodeIdMap() {
|
||||||
static base::NoDestructor<FrameTreeNodeIdMap> instance;
|
static base::NoDestructor<FrameTreeNodeIdMap> instance;
|
||||||
|
|
|
@ -10,24 +10,22 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// Unity data typedefs.
|
// Unity data typedefs.
|
||||||
typedef struct _UnityInspector UnityInspector;
|
using UnityInspector = struct _UnityInspector;
|
||||||
typedef UnityInspector* (*unity_inspector_get_default_func)();
|
using unity_inspector_get_default_func = UnityInspector* (*)();
|
||||||
typedef gboolean (*unity_inspector_get_unity_running_func)(
|
using unity_inspector_get_unity_running_func =
|
||||||
UnityInspector* self);
|
gboolean (*)(UnityInspector* self);
|
||||||
|
|
||||||
typedef struct _UnityLauncherEntry UnityLauncherEntry;
|
using UnityLauncherEntry = struct _UnityLauncherEntry;
|
||||||
typedef UnityLauncherEntry* (*unity_launcher_entry_get_for_desktop_id_func)(
|
using unity_launcher_entry_get_for_desktop_id_func =
|
||||||
const gchar* desktop_id);
|
UnityLauncherEntry* (*)(const gchar* desktop_id);
|
||||||
typedef void (*unity_launcher_entry_set_count_func)(UnityLauncherEntry* self,
|
using unity_launcher_entry_set_count_func = void (*)(UnityLauncherEntry* self,
|
||||||
gint64 value);
|
gint64 value);
|
||||||
typedef void (*unity_launcher_entry_set_count_visible_func)(
|
using unity_launcher_entry_set_count_visible_func =
|
||||||
UnityLauncherEntry* self,
|
void (*)(UnityLauncherEntry* self, gboolean value);
|
||||||
gboolean value);
|
using unity_launcher_entry_set_progress_func =
|
||||||
typedef void (*unity_launcher_entry_set_progress_func)(UnityLauncherEntry* self,
|
void (*)(UnityLauncherEntry* self, gdouble value);
|
||||||
gdouble value);
|
using unity_launcher_entry_set_progress_visible_func =
|
||||||
typedef void (*unity_launcher_entry_set_progress_visible_func)(
|
void (*)(UnityLauncherEntry* self, gboolean value);
|
||||||
UnityLauncherEntry* self,
|
|
||||||
gboolean value);
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -24,35 +24,34 @@
|
||||||
#include "ui/gfx/x/xproto.h"
|
#include "ui/gfx/x/xproto.h"
|
||||||
|
|
||||||
// libdbusmenu-glib types
|
// libdbusmenu-glib types
|
||||||
typedef struct _DbusmenuMenuitem DbusmenuMenuitem;
|
using DbusmenuMenuitem = struct _DbusmenuMenuitem;
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_func)();
|
using dbusmenu_menuitem_new_func = DbusmenuMenuitem* (*)();
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_with_id_func)(int id);
|
using dbusmenu_menuitem_new_with_id_func = DbusmenuMenuitem* (*)(int id);
|
||||||
|
|
||||||
typedef int (*dbusmenu_menuitem_get_id_func)(DbusmenuMenuitem* item);
|
using dbusmenu_menuitem_get_id_func = int (*)(DbusmenuMenuitem* item);
|
||||||
typedef GList* (*dbusmenu_menuitem_get_children_func)(DbusmenuMenuitem* item);
|
using dbusmenu_menuitem_get_children_func = GList* (*)(DbusmenuMenuitem* item);
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_child_append_func)(
|
using dbusmenu_menuitem_child_append_func =
|
||||||
DbusmenuMenuitem* parent,
|
DbusmenuMenuitem* (*)(DbusmenuMenuitem* parent, DbusmenuMenuitem* child);
|
||||||
DbusmenuMenuitem* child);
|
using dbusmenu_menuitem_property_set_func =
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_property_set_func)(
|
DbusmenuMenuitem* (*)(DbusmenuMenuitem* item,
|
||||||
DbusmenuMenuitem* item,
|
|
||||||
const char* property,
|
const char* property,
|
||||||
const char* value);
|
const char* value);
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_property_set_variant_func)(
|
using dbusmenu_menuitem_property_set_variant_func =
|
||||||
DbusmenuMenuitem* item,
|
DbusmenuMenuitem* (*)(DbusmenuMenuitem* item,
|
||||||
const char* property,
|
const char* property,
|
||||||
GVariant* value);
|
GVariant* value);
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_property_set_bool_func)(
|
using dbusmenu_menuitem_property_set_bool_func =
|
||||||
DbusmenuMenuitem* item,
|
DbusmenuMenuitem* (*)(DbusmenuMenuitem* item,
|
||||||
const char* property,
|
const char* property,
|
||||||
bool value);
|
bool value);
|
||||||
typedef DbusmenuMenuitem* (*dbusmenu_menuitem_property_set_int_func)(
|
using dbusmenu_menuitem_property_set_int_func =
|
||||||
DbusmenuMenuitem* item,
|
DbusmenuMenuitem* (*)(DbusmenuMenuitem* item,
|
||||||
const char* property,
|
const char* property,
|
||||||
int value);
|
int value);
|
||||||
|
|
||||||
typedef struct _DbusmenuServer DbusmenuServer;
|
using DbusmenuServer = struct _DbusmenuServer;
|
||||||
typedef DbusmenuServer* (*dbusmenu_server_new_func)(const char* object);
|
using dbusmenu_server_new_func = DbusmenuServer* (*)(const char* object);
|
||||||
typedef void (*dbusmenu_server_set_root_func)(DbusmenuServer* self,
|
using dbusmenu_server_set_root_func = void (*)(DbusmenuServer* self,
|
||||||
DbusmenuMenuitem* root);
|
DbusmenuMenuitem* root);
|
||||||
|
|
||||||
namespace electron {
|
namespace electron {
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace asar {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
typedef std::map<base::FilePath, std::shared_ptr<Archive>> ArchiveMap;
|
using ArchiveMap = std::map<base::FilePath, std::shared_ptr<Archive>>;
|
||||||
|
|
||||||
const base::FilePath::CharType kAsarExtension[] = FILE_PATH_LITERAL(".asar");
|
const base::FilePath::CharType kAsarExtension[] = FILE_PATH_LITERAL(".asar");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue