Skip to content
Snippets Groups Projects
Commit dffc65d4 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: make token null constructor constexpr, noexcept

parent 2fde6c3a
......@@ -55,7 +55,7 @@ SourceFiles
namespace Foam
{
// Forward declaration of friend functions and operators
// Forward declarations
class token;
......@@ -76,7 +76,7 @@ public:
// the maximum number of types is limited to 30.
enum tokenType
{
UNDEFINED, //!< An undefined token-type
UNDEFINED = 0, //!< An undefined token-type
// Fundamental types
FLAG, //!< stream flag (1-byte bitmask)
......@@ -303,7 +303,7 @@ public:
// Constructors
//- Construct null
inline token();
inline constexpr token() noexcept;
//- Copy construct
inline token(const token& t);
......
......@@ -118,7 +118,7 @@ inline void Foam::token::clear()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline Foam::token::token()
inline constexpr Foam::token::token() noexcept
:
data_(), // bit-wise zero for union content
type_(tokenType::UNDEFINED),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment