Skip to content

Odd formatting for while loops #124

@SaschaWillems

Description

@SaschaWillems

We have a lot of places where while loops are written like this:

        while ( vk::Result::eTimeout == device.waitForFences( *inFlightFences[currentFrame], vk::True, UINT64_MAX ) )
            ;

This seems to be a short-hand version of while, hich is okay, but what looks odd is the line break and identation for the semicolon.

@gpx1000: Any reason the semicolon is on the next line and indented like that?

I'd prefer to clean up like this:

        while ( vk::Result::eTimeout == device.waitForFences( *inFlightFences[currentFrame], vk::True, UINT64_MAX ) );

Or maybe even remove the while? We already wait for a very long time (UINT64_MAX), the while loop would prob. never do anything as the TDR (at least on Windows) already would've reset the driver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions