Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/templates.c [db140b] .. [0998f1] Maximize Restore

  Switch to side-by-side view

--- a/src/templates.c
+++ b/src/templates.c
@@ -300,7 +300,7 @@
 {
 	gchar *path = g_build_filename(app->configdir, GEANY_TEMPLATES_SUBDIR, NULL);
 
-	g_return_if_fail(NZV(doc->real_path));
+	g_return_if_fail(!EMPTY(doc->real_path));
 
 	if (strncmp(doc->real_path, path, strlen(path)) == 0)
 	{
@@ -365,9 +365,9 @@
 	template_eol_char = utils_get_eol_char(template_eol_mode);
 
 	filetype_get_comment_open_close(ft, FALSE, &co, &cc);
-	if (NZV(co))
-	{
-		if (NZV(cc))
+	if (!EMPTY(co))
+	{
+		if (!EMPTY(cc))
 		{
 			frame_start = g_strconcat(co, template_eol_char, NULL);
 			frame_end = g_strconcat(cc, template_eol_char, NULL);
@@ -388,7 +388,7 @@
 	}
 
 	/* do some magic to nicely format C-like multi-line comments */
-	if (NZV(frame_start) && frame_start[1] == '*')
+	if (!EMPTY(frame_start) && frame_start[1] == '*')
 	{
 		/* prefix the string with a space */
 		SETPTR(frame_end, g_strconcat(" ", frame_end, NULL));