[Box Backup-dev] COMMIT r308 - box/chris/win32/vc2005-compile-fixes/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Jan 6 20:20:35 GMT 2006


Author: chris
Date: 2006-01-06 20:20:33 +0000 (Fri, 06 Jan 2006)
New Revision: 308

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
Log:
* FdGetLine.cpp
- Added comments about the signedness of "begin" and "end"


Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-01-06 20:17:39 UTC (rev 307)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-01-06 20:20:33 UTC (rev 308)
@@ -154,7 +154,7 @@
 	else
 	{
 		// Check for comment char, but char before must be whitespace
-		int end = 0;
+		int end = 0; // can be negative
 		std::string::size_type size = r.size();
 		while(end < size)
 		{
@@ -166,7 +166,7 @@
 		}
 		
 		// Remove whitespace
-		int begin = 0;
+		int begin = 0; // should be positive, but compared with "end"
 		while(begin < size && iw(r[begin]))
 		{
 			begin++;




More information about the Boxbackup-dev mailing list