Skip to content

The "I regret nothing" solution #7

@isc30

Description

@isc30

Credit: @AlexOteiza

for (auto i = 0; i < 3; i++) 
{
    X* pX = nullptr;
    
    // Begin
    
    if (i == 0)
    {
        X0 var;
        var.Process();
    }
    else if (i == 1)
    {
        X1 var;
        var.Process();
    }
    else
    {
        X2 var;
        var.Process();
    }
    
    continue; // I regret nothing
    
    // End
    
    pX->Process();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions