diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-11 23:33:23 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-11 23:33:23 -0400 |
| commit | 09f98576e882a5fef68cdefdff939834a8782eaa (patch) | |
| tree | b3094bf7e84d5479b2e6806b0c5103788cf871d5 /src/env.h | |
| parent | 9c59c739d4ef9a4479ac849badc998b200fddb13 (diff) | |
added env::getFileSecurity()
Environment gets stuff on demand
Diffstat (limited to 'src/env.h')
| -rw-r--r-- | src/env.h | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -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 // |
