Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2332)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2452)
@@ -159,7 +159,9 @@
 	mAssumedVisibility = assumedVisibility;
 	
-	mThreshold = 0;
-
-	if (mAssumedVisibility > 0)
+	if (!mAssumedVisibility)
+	{
+		mThreshold = 0;
+	}
+	else
 	{
 		mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2342)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2452)
@@ -181,8 +181,8 @@
 								 vector<FaceParentInfo> *parents)
 {
-	//ifstream samplesIn(filename, ios::binary);
-	igzstream samplesIn(filename.c_str());
-	
-	if (!samplesIn.is_open())
+	//ifstream inStream(filename, ios::binary);
+	igzstream inStream(filename.c_str());
+	
+	if (!inStream.is_open())
 		return false;
 
@@ -192,5 +192,5 @@
 	int numTriangles;
 
-	samplesIn.read(reinterpret_cast<char *>(&numTriangles), sizeof(int));
+	inStream.read(reinterpret_cast<char *>(&numTriangles), sizeof(int));
 	root->mGeometry.reserve(numTriangles);
 	cout << "loading " << numTriangles << " triangles (" 
@@ -202,10 +202,10 @@
 		Triangle3 tri;
 		
-		samplesIn.read(reinterpret_cast<char *>(tri.mVertices + 0), sizeof(Vector3));
-		samplesIn.read(reinterpret_cast<char *>(tri.mVertices + 1), sizeof(Vector3));
-		samplesIn.read(reinterpret_cast<char *>(tri.mVertices + 2), sizeof(Vector3));
+		inStream.read(reinterpret_cast<char *>(tri.mVertices + 0), sizeof(Vector3));
+		inStream.read(reinterpret_cast<char *>(tri.mVertices + 1), sizeof(Vector3));
+		inStream.read(reinterpret_cast<char *>(tri.mVertices + 2), sizeof(Vector3));
 
 		// end of file reached
-		if (samplesIn.eof())
+		if (inStream.eof())
 			break;
 
@@ -841,10 +841,10 @@
 
 #if USE_ASCII
-	ifstream samplesIn(fileName);
-	if (!samplesIn.is_open())
+	ifstream inStream(fileName);
+	if (!inStream.is_open())
 		return false;
 
 	string buf;
-	while (!(getline(samplesIn, buf)).eof())
+	while (!(getline(inStream, buf)).eof())
 	{
 		sscanf(buf.c_str(), "%f %f %f %f %f %f %d %d", 
@@ -873,16 +873,16 @@
 	}
 #else
-	ifstream samplesIn(fileName, ios::binary);
-	if (!samplesIn.is_open())
+	ifstream inStream(fileName, ios::binary);
+	if (!inStream.is_open())
 		return false;
 
 	while (1)
 	{
-		 samplesIn.read(reinterpret_cast<char *>(&origin), sizeof(Vector3));
-		 samplesIn.read(reinterpret_cast<char *>(&termination), sizeof(Vector3));
-		 samplesIn.read(reinterpret_cast<char *>(&(sObj.mId)), sizeof(int));
-		 samplesIn.read(reinterpret_cast<char *>(&(tObj.mId)), sizeof(int));
-		
-		 if (samplesIn.eof())
+		 inStream.read(reinterpret_cast<char *>(&origin), sizeof(Vector3));
+		 inStream.read(reinterpret_cast<char *>(&termination), sizeof(Vector3));
+		 inStream.read(reinterpret_cast<char *>(&(sObj.mId)), sizeof(int));
+		 inStream.read(reinterpret_cast<char *>(&(tObj.mId)), sizeof(int));
+		
+		 if (inStream.eof())
 			break;
 
@@ -908,5 +908,5 @@
 #endif
 
-	samplesIn.close();
+	inStream.close();
 
 	return true;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2353)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2452)
@@ -64,17 +64,19 @@
 
 
-static string ReplaceSuffix(string filename, string a, string b)
+static string ReplaceSuffix(const string &filename, const string &a, const string &b)
 {
 	string result = filename;
 
 	int pos = (int)filename.rfind(a, (int)filename.size() - 1);
-	if (pos == filename.size() - a.size()) {
+	if (pos == filename.size() - a.size()) 
+	{
 		result.replace(pos, a.size(), b);
 	}
+
 	return result;
 }
 
 
-static int SplitFilenames(const string str, vector<string> &filenames)
+static int SplitFilenames(const string &str, vector<string> &filenames)
 {
 	int pos = 0;
