summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/env.h b/src/env.h
index 1f146a08..46095ca3 100644
--- a/src/env.h
+++ b/src/env.h
@@ -79,6 +79,19 @@ template <class T>
using COMPtr = std::unique_ptr<T, COMReleaser>;
+// used by MallocPtr, calls std::free() as the deleter
+//
+struct MallocFreer
+{
+ void operator()(void* p)
+ {
+ std::free(p);
+ }
+};
+
+template <class T>
+using MallocPtr = std::unique_ptr<T, MallocFreer>;
+
// creates a console in the constructor and destroys it in the destructor,
// also redirects standard streams
//
@@ -133,10 +146,10 @@ public:
void dump(const Settings& s) const;
private:
- std::vector<Module> m_modules;
- std::unique_ptr<WindowsInfo> m_windows;
- std::vector<SecurityProduct> m_security;
- std::unique_ptr<Metrics> m_metrics;
+ mutable std::vector<Module> m_modules;
+ mutable std::unique_ptr<WindowsInfo> m_windows;
+ mutable std::vector<SecurityProduct> m_security;
+ mutable std::unique_ptr<Metrics> m_metrics;
// dumps all the disks involved in the settings
//