Commit 8f2e7068 authored by dickelbeck's avatar dickelbeck
Browse files

const of GetZoom()

parent 57126e83
Loading
Loading
Loading
Loading
+22 −21
Original line number Diff line number Diff line
@@ -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)
 */
{
    int ii, nbitems, * zoom;
    int         nbitems;
    const int*  zoom;

    // Decompte des items
    // get list length
    for( nbitems = 1, zoom = zoomlist;  ; zoom++, nbitems++ )
    {
        if( *zoom == 0 )
            break;
    }

    // Init liste
    // resize our list
    if( m_ZoomList )
        free( m_ZoomList );

    m_ZoomList = (int*) MyZMalloc( nbitems * sizeof(int) );

    int ii;
    for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ )
    {
        m_ZoomList[ii] = *zoom;
@@ -212,10 +214,9 @@ void BASE_SCREEN::SetFirstZoom()
}


/****************************/
int BASE_SCREEN::GetZoom()
/****************************/
/* retourne le coeff de zoom */
/******************************/
int BASE_SCREEN::GetZoom() const
/******************************/
{
    return m_Zoom;
}