Closed DeafMan1983 closed 10 months ago
There's no difference between the two pieces of code. default: { }
is simply the case that is executed if no other entry is matched and if no default
exists, then it executes the next statement following the switch
block.
It only comes down to stylistic preference, and personally I prefer having it as part of the switch
to make it clear that every case returns and there is no additional code that will execute.
Ok thanks for understanding!
Shouldn't default: because I have tested since I clicked Titlebar than maximized and unmaximized without default: cause It crashed since you wrote default: { ... }
It fixed without default: It works as well under Windows 10 ( latest build version )
Proof: I have tested with debug and release without default: { ... } = Works fine 100 %.
Thank you for accepting my solution!