diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2020-11-20 18:07:14 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2020-11-22 15:10:14 -0800 |
commit | 092157e16f3a098c0b7c99ebdd7de6a3daaad0c9 (patch) | |
tree | 8d8501a983cf7fb7d199a5fd82d28b3d1fff084c /gjs/module.cpp | |
parent | 85516f96edd3817899217c1f370069e7e07db7a6 (diff) | |
download | gjs-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.cpp | 3 |
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) { |