Skip to content

BUG: Class Member Init Order #371

@proof88

Description

@proof88

WeaponHandling ctor invokes Physics ctor with members that are initialized AFTER Pyhics is initialized, but I don't even get a single compiler warning for this, why??? Is this really a bug?

Prio: P2 because this is long-existing code in previous releases as well and no problem was noticed so far ...

proofps_dd::WeaponHandling::WeaponHandling(
    PGE& pge,
    proofps_dd::Config& config,
    proofps_dd::Durations& durations,
    proofps_dd::GUI& gui,
    std::map<pge_network::PgeNetworkConnectionHandle, proofps_dd::Player>& mapPlayers,
    proofps_dd::Maps& maps,
    proofps_dd::Sounds& sounds,
    proofps_dd::CameraHandling& camera) :
    proofps_dd::Physics(
        pge,
        m_durations,
        gui,
        m_mapPlayers,
        m_maps,
        m_sounds,
        camera),
    proofps_dd::PlayerHandling(pge, durations, gui, mapPlayers, maps, sounds, camera),
    m_pge(pge),
    m_config(config),
    m_durations(durations),
    m_gui(gui),
    m_mapPlayers(mapPlayers),
    m_maps(maps),
    m_sounds(sounds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions