b4n commented on this pull request.
> +/*
+* FUNCTION DEFINITIONS
+*/
+static void findAutoItTags (void)
+{
+ vString *name = vStringNew ();
+ const unsigned char *line;
+
+ while ((line = readLineFromInputFile ()) != NULL)
+ {
+ const unsigned char* p = line;
+ if (p [0] == '#')
+ {
+ /* min. string "#region" > 7 */
+ if ((p [1] == 'R' || p [1] == 'r') &&
+ strlen ((const char *) p) > 8 &&
I still think it's irrelevant, because it's then an "optimization" (as the code
after more correctly checks the syntax), but it only kicks in when the there is
less than an extra 8 characters after the line starting with `f`. This is
highly unlikely to result in any speed benefits (especially as you're checking
the next characters for `unc[ \t]`), and is highly likely to let pass things
that aren't a function anyway but just happen to be long enough.
In any case, unless profiling shows this is faster (I doubt it), the
clearest/simplest thing should be used IMO, which IMO again, is dropping this
check.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1752#discussion_r207922123