Menu

Falce positive when using namespaces: Member variable 'name' is not initialized in the constructor.

2017-10-09
2017-10-14
  • Ken Paulson

    Ken Paulson - 2017-10-09
    namespace Test
    {
        class Clock;
    }
    
    class Test::Clock
    {
    public:
        Clock(void);
    
    private:
        uint64_t m_start;
        uint64_t m_last_frame;
        uint64_t m_current;
        float m_scale;
    };
    
    using namespace Test;
    
    Clock::Clock(void) :
        m_start(0),
        m_last_frame(0),
        m_current(0),
        m_scale(1.0f)
    {
    }
    

    All of the member variables give warnings that they are not initialized in the constructor.

     
  • Daniel Marjamäki

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.