[gjs: 7/11] foreign: Remove unused struct member
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 7/11] foreign: Remove unused struct member
- Date: Fri, 8 Oct 2021 22:02:27 +0000 (UTC)
commit 132326a95a2c30ec59e7a7e87e6bc7b467238c1f
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Sep 28 23:22:15 2021 -0700
foreign: Remove unused struct member
This member is never read, so no need to store it. While here, clean up
the casts by using const char.
gi/foreign.cpp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gi/foreign.cpp b/gi/foreign.cpp
index d7a03257..6c79bcb0 100644
--- a/gi/foreign.cpp
+++ b/gi/foreign.cpp
@@ -16,12 +16,13 @@
#include "gjs/jsapi-util.h"
static struct {
- char *gi_namespace;
- char *module; // relative to "imports."
+ const char* gi_namespace;
bool loaded;
} foreign_modules[] = {
- { (char*)"cairo", (char*)"cairo", false },
- { NULL }
+ // clang-format off
+ {"cairo", false},
+ {nullptr}
+ // clang-format on
};
static GHashTable* foreign_structs_table = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]