Use inline to define constant in header

This commit is contained in:
Chris Thrasher 2023-11-08 23:39:43 -07:00
parent dcfccbec6e
commit f588589089
4 changed files with 3 additions and 11 deletions

View File

@ -152,8 +152,8 @@ private:
// Static member data // Static member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// NOLINTBEGIN(readability-identifier-naming) // NOLINTBEGIN(readability-identifier-naming)
static ReaderFactoryArray s_readers; //!< List of all registered readers static inline ReaderFactoryArray s_readers; //!< List of all registered readers
static WriterFactoryArray s_writers; //!< List of all registered writers static inline WriterFactoryArray s_writers; //!< List of all registered writers
// NOLINTEND(readability-identifier-naming) // NOLINTEND(readability-identifier-naming)
}; };

View File

@ -58,7 +58,7 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// NOLINTBEGIN(readability-identifier-naming) // NOLINTBEGIN(readability-identifier-naming)
/// Represents an invalid position in the string /// Represents an invalid position in the string
static const std::size_t InvalidPos{std::u32string::npos}; static inline const std::size_t InvalidPos{std::u32string::npos};
// NOLINTEND(readability-identifier-naming) // NOLINTEND(readability-identifier-naming)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -64,10 +64,6 @@ void ensureDefaultReadersWritersRegistered()
namespace sf namespace sf
{ {
SoundFileFactory::ReaderFactoryArray SoundFileFactory::s_readers;
SoundFileFactory::WriterFactoryArray SoundFileFactory::s_writers;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
std::unique_ptr<SoundFileReader> SoundFileFactory::createReaderFromFilename(const std::filesystem::path& filename) std::unique_ptr<SoundFileReader> SoundFileFactory::createReaderFromFilename(const std::filesystem::path& filename)
{ {

View File

@ -37,10 +37,6 @@
namespace sf namespace sf
{ {
////////////////////////////////////////////////////////////
const std::size_t String::InvalidPos;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
String::String() = default; String::String() = default;