NamedEnum: Updated to support C++11 scoped enumerations

This commit is contained in:
Henry Weller
2017-02-02 17:02:59 +00:00
parent 3d315f09f9
commit ba4dbeda77

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -113,7 +113,7 @@ public:
//- Return the name of the given enumeration element //- Return the name of the given enumeration element
const char* operator[](const Enum e) const const char* operator[](const Enum e) const
{ {
return names[e]; return names[int(e)];
} }
}; };