diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-03-07 16:11:40 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-03-07 16:11:40 +0000 |
| commit | 89fa6d4fbfe4b155d6f14a1a56807dc5f22efffe (patch) | |
| tree | bc7023dfb0acd2486c1a947ac38cca9263474277 /src | |
| parent | b1a57a2b800458c5a19ad27d66bd02a8817b6685 (diff) | |
Small code simplification
Diffstat (limited to 'src')
| -rw-r--r-- | src/option_manager.hh | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/option_manager.hh b/src/option_manager.hh index 9cd31278..958a01f4 100644 --- a/src/option_manager.hh +++ b/src/option_manager.hh @@ -40,7 +40,7 @@ private: OptionFlags m_flags; }; -class Option +class Option : public UseMemoryDomain<MemoryDomain::Options> { public: virtual ~Option() = default; @@ -143,18 +143,6 @@ public: if (option_add(m_value, str)) m_manager.on_option_changed(*this); } - - using Alloc = Allocator<TypedOption, MemoryDomain::Options>; - static void* operator new (std::size_t sz) - { - kak_assert(sz == sizeof(TypedOption)); - return Alloc{}.allocate(1); - } - - static void operator delete (void* ptr) - { - return Alloc{}.deallocate(reinterpret_cast<TypedOption*>(ptr), 1); - } private: virtual void validate(const T& value) const {} T m_value; |
