[gjs: 7/16] module: Delete GjsScriptModule copy constructor and assignment operator
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 7/16] module: Delete GjsScriptModule copy constructor and assignment operator
- Date: Mon, 23 Nov 2020 18:24:47 +0000 (UTC)
commit 092157e16f3a098c0b7c99ebdd7de6a3daaad0c9
Author: Philip Chimento <philip chimento gmail com>
Date: Fri Nov 20 18:07:14 2020 -0800
module: Delete GjsScriptModule copy constructor and assignment operator
These allocate memory, and we don't want to do that accidentally. Caught
by cppcheck.
gjs/module.cpp | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gjs/module.cpp b/gjs/module.cpp
index 0d637fd0..4e4a8b6a 100644
--- a/gjs/module.cpp
+++ b/gjs/module.cpp
@@ -41,6 +41,9 @@ class GjsScriptModule {
GJS_DEC_COUNTER(module);
}
+ GjsScriptModule(GjsScriptModule&) = delete;
+ GjsScriptModule& operator=(GjsScriptModule&) = delete;
+
/* Private data accessors */
[[nodiscard]] static inline GjsScriptModule* priv(JSObject* module) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]