Fixed some warning on MSVC

Mon, 11 Jan 2016 00:56:44 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Mon, 11 Jan 2016 00:56:44 +0200
changeset 119
9eb47f1899be
parent 118
ae284bf1b5ff
child 120
32ba3ae4daf1

Fixed some warning on MSVC

sources/interface.cpp file | annotate | diff | comparison | revisions
--- a/sources/interface.cpp	Mon Jan 11 02:49:29 2016 +0200
+++ b/sources/interface.cpp	Mon Jan 11 00:56:44 2016 +0200
@@ -174,9 +174,9 @@
 	if (::has_colors())
 	{
 		::start_color();
-		bool hasDefaultColors = ::use_default_colors();
-		int defaultFg = (hasDefaultColors == OK) ? -1 : COLOR_WHITE;
-		int defaultBg = (hasDefaultColors == OK) ? -1 : COLOR_BLACK;
+		bool hasDefaultColors = (::use_default_colors() == OK);
+		int defaultFg = hasDefaultColors ? -1 : COLOR_WHITE;
+		int defaultBg = hasDefaultColors ? -1 : COLOR_BLACK;
 
 		// Initialize color pairs
 		for (int i = 0; i < NUM_COLORS; ++i)

mercurial