summaryrefslogtreecommitdiff
path: root/gjs/module.cpp
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2020-11-20 18:07:14 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2020-11-22 15:10:14 -0800
commit092157e16f3a098c0b7c99ebdd7de6a3daaad0c9 (patch)
tree8d8501a983cf7fb7d199a5fd82d28b3d1fff084c /gjs/module.cpp
parent85516f96edd3817899217c1f370069e7e07db7a6 (diff)
downloadgjs-092157e16f3a098c0b7c99ebdd7de6a3daaad0c9.tar.gz
module: Delete GjsScriptModule copy constructor and assignment operator
These allocate memory, and we don't want to do that accidentally. Caught by cppcheck.
Diffstat (limited to 'gjs/module.cpp')
-rw-r--r--gjs/module.cpp3
1 files changed, 3 insertions, 0 deletions
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) {