Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mimi89999 on April 02, 2020, 12:58:37 pm

Title: Issue in 1TBS code example
Post by: mimi89999 on April 02, 2020, 12:58:37 pm
The example code is:
```
int Foo(bool isBar)
{
    if (isFoo) {
        bar();
        return 1;
    } else {
        return 0;
    }
}
```

It's of course wrong. It should be `if (isBar) {`

OS: Debian GNU/Linux bullseye/sid 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13)
C::B version: 20.03-r11983
Title: Re: Issue in 1TBS code example
Post by: mimi89999 on April 02, 2020, 03:23:31 pm
I made a patch for this: https://sourceforge.net/p/codeblocks/tickets/938/

I hope that it's correct.
Title: Re: Issue in 1TBS code example
Post by: MortenMacFly on April 02, 2020, 04:45:40 pm
I made a patch for this: https://sourceforge.net/p/codeblocks/tickets/938/
You are right. Fixed in trunk. Thank you!