Commit 8f2e7068 authored by dickelbeck's avatar dickelbeck

const of GetZoom()

parent 57126e83
...@@ -174,28 +174,30 @@ wxSize BASE_SCREEN::ReturnPageSize() ...@@ -174,28 +174,30 @@ wxSize BASE_SCREEN::ReturnPageSize()
} }
/********************************************/ /**************************************************/
void BASE_SCREEN::SetZoomList( int* zoomlist ) void BASE_SCREEN::SetZoomList( const int* zoomlist )
/********************************************/ /**************************************************/
/* init liste des zoom (NULL terminated) /* init liste des zoom (NULL terminated)
*/ */
{ {
int ii, nbitems, * zoom; int nbitems;
const int* zoom;
// Decompte des items // get list length
for( nbitems = 1, zoom = zoomlist; ; zoom++, nbitems++ ) for( nbitems = 1, zoom = zoomlist; ; zoom++, nbitems++ )
{ {
if( *zoom == 0 ) if( *zoom == 0 )
break; break;
} }
// Init liste // resize our list
if( m_ZoomList ) if( m_ZoomList )
free( m_ZoomList ); free( m_ZoomList );
m_ZoomList = (int*) MyZMalloc( nbitems * sizeof( int) ); m_ZoomList = (int*) MyZMalloc( nbitems * sizeof(int) );
int ii;
for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ ) for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ )
{ {
m_ZoomList[ii] = *zoom; m_ZoomList[ii] = *zoom;
...@@ -212,10 +214,9 @@ void BASE_SCREEN::SetFirstZoom() ...@@ -212,10 +214,9 @@ void BASE_SCREEN::SetFirstZoom()
} }
/****************************/ /******************************/
int BASE_SCREEN::GetZoom() int BASE_SCREEN::GetZoom() const
/****************************/ /******************************/
/* retourne le coeff de zoom */
{ {
return m_Zoom; return m_Zoom;
} }
......
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