r23230 by jghali - Fix msvc warning C4309: truncation of constant value

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 1 03:57:05 UTC 2019


Author: jghali
Date: Tue Oct  1 03:57:05 2019
New Revision: 23230

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23230
Log:
Fix msvc warning C4309: truncation of constant value

Modified:
    trunk/Scribus/scribus/fonts/scface_ps.cpp

Modified: trunk/Scribus/scribus/fonts/scface_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23230&path=/trunk/Scribus/scribus/fonts/scface_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface_ps.cpp	(original)
+++ trunk/Scribus/scribus/fonts/scface_ps.cpp	Tue Oct  1 03:57:05 2019
@@ -183,12 +183,12 @@
 {
 	QByteArray bb;
 	rawData(bb);
-	if ((bb.size() > 2) &&  (bb[0] == char(0x80)) && (static_cast<int>(bb[1]) == 1))
+	if ((bb.size() > 2) &&  (bb[0] == '\x80') && (static_cast<int>(bb[1]) == 1))
 	{
 		int posi,cxxc=0;
 		for (posi = 6; posi < bb.size(); ++posi)
 		{
-			if ((bb[posi] == char(0x80)) && (posi+1 < bb.size()) && (static_cast<int>(bb[posi+1]) == 2))
+			if ((bb[posi] == '\x80') && (posi+1 < bb.size()) && (static_cast<int>(bb[posi+1]) == 2))
 				break;
 			str += bb[posi];
 		}
@@ -203,7 +203,7 @@
 			if (posi + ulen > bb.size())
 				ulen = bb.size() - posi - 1;
 			char linebuf[80];
-			cxxc=0;
+			cxxc = 0;
 			for (int j = 0; j < ulen; ++j)
 			{
 				unsigned char u = bb[posi];
@@ -211,8 +211,8 @@
 				if (u>0x9f)
 					linebuf[cxxc] += 'a'-':';
 				++cxxc;
-				u&=15;
-				linebuf[cxxc]=u + '0';
+				u &= 15;
+				linebuf[cxxc] = u + '0';
 				if (u>0x9)
 					linebuf[cxxc] += 'a'-':';
 				++posi;
@@ -225,7 +225,7 @@
 					cxxc = 0;
 				}
 			}
-			linebuf[cxxc]=0;
+			linebuf[cxxc] = 0;
 			str += linebuf;
 			str += "\n";
 		}




More information about the scribus-commit mailing list