diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index 8eb82c0c9..fbde269e7 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -233,18 +233,18 @@ private: void operator()(InputStream* ptr) const; - bool owned; + bool owned{true}; }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::unique_ptr m_reader; //!< Reader that handles I/O on the file's format - std::unique_ptr m_stream; //!< Input stream used to access the file's data - std::uint64_t m_sampleOffset; //!< Sample Read Position - std::uint64_t m_sampleCount; //!< Total number of samples in the file - unsigned int m_channelCount; //!< Number of channels of the sound - unsigned int m_sampleRate; //!< Number of samples per second + std::unique_ptr m_reader; //!< Reader that handles I/O on the file's format + std::unique_ptr m_stream{nullptr, false}; //!< Input stream used to access the file's data + std::uint64_t m_sampleOffset{}; //!< Sample Read Position + std::uint64_t m_sampleCount{}; //!< Total number of samples in the file + unsigned int m_channelCount{}; //!< Number of channels of the sound + unsigned int m_sampleRate{}; //!< Number of samples per second }; } // namespace sf diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index 99f74091b..280426948 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -56,38 +56,13 @@ public: template struct Span { - //////////////////////////////////////////////////////////// - /// \brief Default constructor - /// - //////////////////////////////////////////////////////////// - Span() - { - } - - //////////////////////////////////////////////////////////// - /// \brief Initialization constructor - /// - /// \param off Initial Offset - /// \param len Initial Length - /// - //////////////////////////////////////////////////////////// - Span(T off, T len) : offset(off), length(len) - { - } - - T offset; //!< The beginning offset of the time range - T length; //!< The length of the time range + T offset{}; //!< The beginning offset of the time range + T length{}; //!< The length of the time range }; // Define the relevant Span types using TimeSpan = Span