summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-11 23:33:23 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-11 23:33:23 -0400
commit09f98576e882a5fef68cdefdff939834a8782eaa (patch)
treeb3094bf7e84d5479b2e6806b0c5103788cf871d5 /src/env.h
parent9c59c739d4ef9a4479ac849badc998b200fddb13 (diff)
added env::getFileSecurity()
Environment gets stuff on demand
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
//