浏览代码

Tightened scope of some local variables.

Camilla Berglund 13 年之前
父节点
当前提交
1bad573c10
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/opengl.c

+ 3 - 2
src/opengl.c

@@ -589,8 +589,6 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
 {
 {
     const GLubyte* extensions;
     const GLubyte* extensions;
     _GLFWwindow* window;
     _GLFWwindow* window;
-    GLint count;
-    int i;
 
 
     if (!_glfwInitialized)
     if (!_glfwInitialized)
     {
     {
@@ -624,6 +622,9 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
     }
     }
     else
     else
     {
     {
+        int i;
+        GLint count;
+
         // Check if extension is in the modern OpenGL extensions string list
         // Check if extension is in the modern OpenGL extensions string list
 
 
         glGetIntegerv(GL_NUM_EXTENSIONS, &count);
         glGetIntegerv(GL_NUM_EXTENSIONS, &count);