@b4n commented on this pull request.


In src/tagmanager/tm_parser.c:

>  				/* retval before function */
 				g_string_prepend_c(str, ' ');
 				g_string_prepend(str, retval);
 				break;
 		}
+		if (sep)
+		{
+			g_string_append(str, sep);
+			g_string_append(str, retval);
+		}

I'd rather have an if/else here if the value of sep is the criteria, like that I find the code weird as well.

⬇️ Suggested change
-				/* retval before function */
-				g_string_prepend_c(str, ' ');
-				g_string_prepend(str, retval);
-				break;
-		}
-		if (sep)
-		{
-			g_string_append(str, sep);
-			g_string_append(str, retval);
-		}
+				break;
+		}
+
+		if (sep)
+		{
+			/* retval after function */
+			g_string_append(str, sep);
+			g_string_append(str, retval);
+		}
+		else
+		{
+			/* retval before function */
+			g_string_prepend_c(str, ' ');
+			g_string_prepend(str, retval);
+		}


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3463/review/1392638940@github.com>