Anonymous avatar Anonymous committed 2481b16

Preserving the standard line endings for the source code.

Comments (0)

Files changed (3)

src/modules/graphics/opengl/OpenGL.cpp

 	contextInitialized = false;
 }
 
-void OpenGL::ParseOpenGLVersion()
-{
-	const char *strVersion = (const char *)glGetString(GL_VERSION);
-	const char *strDotPos = NULL;
-	int iLength = 0;
-	char strWorkBuff[10];
-	minorVersion = 0;
-	majorVersion = 0;
-		
-	strDotPos = strchr(strVersion, '.');
-	if(!strDotPos)
-		return;
-		
-	iLength = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
-	strncpy(strWorkBuff, strVersion, iLength);
-	strWorkBuff[iLength] = '\0';
-		
-	majorVersion = atoi(strWorkBuff);
-	strDotPos = strchr(strVersion + iLength + 1, ' ');
-	if(!strDotPos)
-	{
-		/*No extra data. Take the whole rest of the string.*/
-		strcpy(strWorkBuff, strVersion + iLength + 1);
-	}
-	else
-	{
-		/*Copy only up until the space.*/
-		int iLengthMinor = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
-		iLengthMinor = iLengthMinor - (iLength + 1);
-		strncpy(strWorkBuff, strVersion + iLength + 1, iLengthMinor);
-		strWorkBuff[iLengthMinor] = '\0';
-	}
-		
-	minorVersion = atoi(strWorkBuff);
-}
+void OpenGL::ParseOpenGLVersion()
+{
+	const char *strVersion = (const char *)glGetString(GL_VERSION);
+	const char *strDotPos = NULL;
+	int iLength = 0;
+	char strWorkBuff[10];
+	minorVersion = 0;
+	majorVersion = 0;
+		
+	strDotPos = strchr(strVersion, '.');
+	if(!strDotPos)
+		return;
+		
+	iLength = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
+	strncpy(strWorkBuff, strVersion, iLength);
+	strWorkBuff[iLength] = '\0';
+		
+	majorVersion = atoi(strWorkBuff);
+	strDotPos = strchr(strVersion + iLength + 1, ' ');
+	if(!strDotPos)
+	{
+		/*No extra data. Take the whole rest of the string.*/
+		strcpy(strWorkBuff, strVersion + iLength + 1);
+	}
+	else
+	{
+		/*Copy only up until the space.*/
+		int iLengthMinor = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
+		iLengthMinor = iLengthMinor - (iLength + 1);
+		strncpy(strWorkBuff, strVersion + iLength + 1, iLengthMinor);
+		strWorkBuff[iLengthMinor] = '\0';
+	}
+		
+	minorVersion = atoi(strWorkBuff);
+}
 
 
 void OpenGL::initOpenGLFunctions()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.