Commit af657fc8 authored by unknown's avatar unknown Committed by jean-pierre charras

3d-viewer: fix compil warning, by Mario Luzeiro, with some coding style fixes.

parent 242d42cf
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <fctsys.h> #include <fctsys.h>
#include <kiface_i.h> #include <kiface_i.h>
#include <pgm_base.h> #include <pgm_base.h>
#include <macros.h>
#include <3d_viewer.h> #include <3d_viewer.h>
#include <3d_canvas.h> #include <3d_canvas.h>
...@@ -133,8 +134,6 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, ...@@ -133,8 +134,6 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
#if wxCHECK_VERSION( 3, 0, 0 ) #if wxCHECK_VERSION( 3, 0, 0 )
unsigned int ii;
// Check if the canvas supports multisampling. // Check if the canvas supports multisampling.
if( EDA_3D_CANVAS::IsDisplaySupported( attrs ) ) if( EDA_3D_CANVAS::IsDisplaySupported( attrs ) )
{ {
...@@ -142,7 +141,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, ...@@ -142,7 +141,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
int maxSamples = 8; // Any higher doesn't change anything. int maxSamples = 8; // Any higher doesn't change anything.
int samplesOffset = 0; int samplesOffset = 0;
for( ii = 0; ii < sizeof( attrs ) / sizeof( attrs[0] ) - 1; ii += 2 ) for( unsigned int ii = 0; ii < DIM( attrs ); ii += 2 )
{ {
if( attrs[ii] == WX_GL_SAMPLES ) if( attrs[ii] == WX_GL_SAMPLES )
{ {
...@@ -162,7 +161,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, ...@@ -162,7 +161,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
else else
{ {
// Disable multisampling // Disable multisampling
for( ii = 0; ii < sizeof( attrs ) / sizeof( attrs[0] ) - 1; ii += 2 ) for( unsigned int ii = 0; ii < DIM( attrs ); ii += 2 )
{ {
if( attrs[ii] == WX_GL_SAMPLE_BUFFERS ) if( attrs[ii] == WX_GL_SAMPLE_BUFFERS )
{ {
......
...@@ -107,9 +107,10 @@ char* GetNextTag( FILE* File, char* tag ) ...@@ -107,9 +107,10 @@ char* GetNextTag( FILE* File, char* tag )
if( (c != '}') && (c != ']') ) if( (c != '}') && (c != ']') )
{ {
char *dst = &tag[1]; char *dst = &tag[1];
while (fscanf( File, "%c", dst)) while( fscanf( File, "%c", dst) )
{ {
if( (*dst == ' ') || (*dst == '[') || (*dst == '{') || (*dst == '\t') || (*dst == '\n')|| (*dst == '\r') ) if( (*dst == ' ') || (*dst == '[') || (*dst == '{') ||
(*dst == '\t') || (*dst == '\n')|| (*dst == '\r') )
{ {
*dst = 0; *dst = 0;
break; break;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment