From e7c37f21b7a90bd89a67b5cae95fb62ce1c3ac5f Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Tue, 6 Oct 2020 20:24:05 +0300 Subject: [PATCH] Add NiFloatInterpController abstraction --- components/nif/controller.cpp | 16 ++-------------- components/nif/controller.hpp | 13 +++---------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/components/nif/controller.cpp b/components/nif/controller.cpp index 8d943b58a..07699239e 100644 --- a/components/nif/controller.cpp +++ b/components/nif/controller.cpp @@ -170,25 +170,13 @@ namespace Nif data.post(nif); } - void NiAlphaController::read(NIFStream *nif) + void NiFloatInterpController::read(NIFStream *nif) { Controller::read(nif); data.read(nif); } - void NiAlphaController::post(NIFFile *nif) - { - Controller::post(nif); - data.post(nif); - } - - void NiRollController::read(NIFStream *nif) - { - Controller::read(nif); - data.read(nif); - } - - void NiRollController::post(NIFFile *nif) + void NiFloatInterpController::post(NIFFile *nif) { Controller::post(nif); data.post(nif); diff --git a/components/nif/controller.hpp b/components/nif/controller.hpp index bf043fbdb..a527a4400 100644 --- a/components/nif/controller.hpp +++ b/components/nif/controller.hpp @@ -143,23 +143,16 @@ public: void post(NIFFile *nif); }; -class NiAlphaController : public Controller +struct NiFloatInterpController : public Controller { -public: NiFloatDataPtr data; void read(NIFStream *nif); void post(NIFFile *nif); }; -class NiRollController : public Controller -{ -public: - NiFloatDataPtr data; - - void read(NIFStream *nif); - void post(NIFFile *nif); -}; +class NiAlphaController : public NiFloatInterpController { }; +class NiRollController : public NiFloatInterpController { }; class NiGeomMorpherController : public Controller {