From 37535ded29722c9a133600b54db7d0f3567cee6e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 20 Dec 2010 14:27:03 +0100 Subject: [PATCH] COMP: NamedEnum specialization within 'Foam' namespace only --- .../miscellaneous/postChannel/channelIndex.C | 25 ++++++++++--------- .../tabulatedWallFunction/general/general.C | 13 ++++++---- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index ce5762b1f3..628a6ba38c 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -33,13 +33,20 @@ License // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum::names[] = +namespace Foam { - "x", - "y", - "z" -}; + template<> + const char* Foam::NamedEnum + < + Foam::vector::components, + 3 + >::names[] = + { + "x", + "y", + "z" + }; +} const Foam::NamedEnum Foam::channelIndex::vectorComponentsNames_; @@ -283,10 +290,4 @@ Foam::channelIndex::channelIndex } -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - - // ************************************************************************* // diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C index a1f6dc421e..5442df3bda 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C @@ -41,16 +41,19 @@ namespace Foam dictionary ); } -} -template<> -const char* -Foam::NamedEnum:: - names[] = + template<> + const char* Foam::NamedEnum + < + Foam::tabulatedWallFunctions::general::interpolationType, + 1 + >::names[] = { "linear" }; +} + const Foam::NamedEnum Foam::tabulatedWallFunctions::general::interpolationTypeNames_;