From 7f13f6a4e920ea26721e80862e4e3fe35f6b3a47 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Thu, 25 Apr 2024 03:09:04 +0300 Subject: [PATCH] Use osg::Fog::compare in NifOsg::Fog::compare --- components/nifosg/fog.hpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/components/nifosg/fog.hpp b/components/nifosg/fog.hpp index 74bad98da5..4557092477 100644 --- a/components/nifosg/fog.hpp +++ b/components/nifosg/fog.hpp @@ -17,16 +17,10 @@ namespace NifOsg int compare(const StateAttribute& sa) const override { - COMPARE_StateAttribute_Types(Fog, sa); - - COMPARE_StateAttribute_Parameter(_mode); - COMPARE_StateAttribute_Parameter(_density); - // _start and _end are intentionally ignored as they go unused - COMPARE_StateAttribute_Parameter(_color); - COMPARE_StateAttribute_Parameter(_fogCoordinateSource); - COMPARE_StateAttribute_Parameter(_useRadialFog); + if (const int base = osg::Fog::compare(sa); base != 0) + return base; + const Fog& rhs = static_cast(sa); COMPARE_StateAttribute_Parameter(mDepth); - return 0; }