Commit 96d864b3 authored by Dirk Mueller's avatar Dirk Mueller

seems like the saying about the first thing that is written in a new

project is "yet another string class" is no longer true.

svn path=/trunk/kdegraphics/kpdf/; revision=250495
parent 960cbef5
#include "QOutputDevPixmap.h"
#include <kglobal.h>
#include <qcursor.h>
#include <qpainter.h>
#include <qmutex.h>
......@@ -9,8 +10,6 @@
#include "kpdf_pagewidget.h"
#include "kpdf_pagewidget.moc"
#include "utils.h"
namespace KPDF
{
PageWidget::PageWidget(QWidget* parent, const char* name)
......@@ -110,7 +109,7 @@ namespace KPDF
mutex.lock();
if (m_doc)
{
m_currentPage = max(0, min( page, m_doc->getNumPages()));
m_currentPage = KMAX(0, KMIN( page, m_doc->getNumPages()));
} else {
m_currentPage = 0;
}
......
template<class T>
inline T min(T a, T b)
{
return ( a < b ? a : b );
}
template<class T>
inline T max(T a, T b)
{
return ( a > b ? a : b );
}
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