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 @@
#include <fctsys.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <macros.h>
#include <3d_viewer.h>
#include <3d_canvas.h>
......@@ -133,8 +134,6 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
#if wxCHECK_VERSION( 3, 0, 0 )
unsigned int ii;
// Check if the canvas supports multisampling.
if( EDA_3D_CANVAS::IsDisplaySupported( attrs ) )
{
......@@ -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 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 )
{
......@@ -162,7 +161,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
else
{
// 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 )
{
......
......@@ -107,9 +107,10 @@ char* GetNextTag( FILE* File, char* tag )
if( (c != '}') && (c != ']') )
{
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;
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