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

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

common.cpp: remove useless  warning on wxWidgets < 3.0 about --with-gtkprint build option: on  wxWidgets < 3.0 on Linux the print function does not work even with this build option.
parents 242d42cf af657fc8
......@@ -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.
......@@ -40,15 +40,6 @@
#include <wx/process.h>
// Show warning if wxWidgets Gnome or GTK printing was not configured.
// Since wxWidgets 3.0, this is no more needed (build in printing works!)
#if defined( __WXGTK__ )
#if !wxCHECK_VERSION( 3, 0, 0 )
# if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG
# warning "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration for full print capabilities."
# endif
#endif
#endif
/**
* Global variables definitions.
......@@ -59,7 +50,6 @@
*/
bool g_ShowPageLimits = true;
EDA_UNITS_T g_UserUnit;
EDA_COLOR_T g_GhostColor;
......
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