Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Patch, Auto add a semicolon for '{}' auto-complete

<< < (2/4) > >>

MortenMacFly:
What happens in my whole file looks like:

--- Code: ---{ | }
--- End code ---
???
You don't check for the first line / character in the editor being reached, or am I wrong?!
If so, your code my result in an infinite loop, maybe even in a crash.

ollydbg:

--- Quote from: MortenMacFly on March 24, 2010, 04:13:09 pm ---What happens in my whole file looks like:

--- Code: ---{ | }
--- End code ---
???
You don't check for the first line / character in the editor being reached, or am I wrong?!
If so, your code my result in an infinite loop, maybe even in a crash.

--- End quote ---
@morten:

Loaden use this for condition below:

--- Code: ---while (text.IsEmpty() && --keyLine);
--- End code ---

Look at the variable: keyLine, when it reaches zero, the loop will break, so, there will never be a infinite loop.

MortenMacFly:

--- Quote from: ollydbg on March 24, 2010, 04:24:40 pm ---Loaden use this for condition below:

--- Code: ---while (text.IsEmpty() && --keyLine);
--- End code ---
Look at the variable: keyLine, when it reaches zero, the loop will break, so, there will never be a infinite loop.

--- End quote ---
Indeed. I missed that. C++ style calculations inside an if/while statement - I don't allow such in my coding style, so I am not used to it.

thomas:
namespace blah{};  ?

Loaden:

--- Quote from: thomas on March 24, 2010, 04:30:15 pm ---namespace blah{};  ?

--- End quote ---
OK, I will fix it!  :D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version