diff options
author | Peter Åstrand <astrand@cendio.se> | 2005-01-13 22:11:30 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2005-01-13 22:11:30 +0000 |
commit | 0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd (patch) | |
tree | a02cb86e7ca980b3ce20fc930e0f0a55a00984d1 /tx | |
parent | f3c26fbdd3c904657c764afaf56688864c214131 (diff) | |
download | tigervnc-0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd.tar.gz tigervnc-0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd.zip |
min and max changed to vncmin and vncmax. This solves many problems: Some platforms predefines or redefines these symbols. Some platforms have header files which chokes if min or max are defined.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@96 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'tx')
-rw-r--r-- | tx/TXButton.h | 4 | ||||
-rw-r--r-- | tx/TXCheckbox.h | 4 | ||||
-rw-r--r-- | tx/TXEntry.h | 2 | ||||
-rw-r--r-- | tx/TXImage.cxx | 4 | ||||
-rw-r--r-- | tx/TXLabel.h | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/tx/TXButton.h b/tx/TXButton.h index 3f0c57e6..c22dbf94 100644 --- a/tx/TXButton.h +++ b/tx/TXButton.h @@ -62,8 +62,8 @@ public: text.buf = rfb::strDup(text_); int textWidth = XTextWidth(defaultFS, text.buf, strlen(text.buf)); int textHeight = (defaultFS->ascent + defaultFS->descent); - int newWidth = max(width(), textWidth + xPad*2 + bevel*2); - int newHeight = max(height(), textHeight + yPad*2 + bevel*2); + int newWidth = vncmax(width(), textWidth + xPad*2 + bevel*2); + int newHeight = vncmax(height(), textHeight + yPad*2 + bevel*2); if (width() < newWidth || height() < newHeight) { resize(newWidth, newHeight); } diff --git a/tx/TXCheckbox.h b/tx/TXCheckbox.h index 146091d0..41eef27c 100644 --- a/tx/TXCheckbox.h +++ b/tx/TXCheckbox.h @@ -71,8 +71,8 @@ public: text = strdup(text_); int textWidth = XTextWidth(defaultFS, text, strlen(text)); int textHeight = (defaultFS->ascent + defaultFS->descent); - int newWidth = max(width(), textWidth + xPad*2 + boxPad*2 + boxSize); - int newHeight = max(height(), textHeight + yPad*2); + int newWidth = vncmax(width(), textWidth + xPad*2 + boxPad*2 + boxSize); + int newHeight = vncmax(height(), textHeight + yPad*2); if (width() < newWidth || height() < newHeight) { resize(newWidth, newHeight); } diff --git a/tx/TXEntry.h b/tx/TXEntry.h index b51946e3..0d1f005f 100644 --- a/tx/TXEntry.h +++ b/tx/TXEntry.h @@ -58,7 +58,7 @@ public: | ButtonPressMask); text[0] = 0; int textHeight = (defaultFS->ascent + defaultFS->descent); - int newHeight = max(height(), textHeight + yPad*2 + bevel*2); + int newHeight = vncmax(height(), textHeight + yPad*2 + bevel*2); if (height() < newHeight) { resize(width(), newHeight); } diff --git a/tx/TXImage.cxx b/tx/TXImage.cxx index d5b06493..caaeec43 100644 --- a/tx/TXImage.cxx +++ b/tx/TXImage.cxx @@ -71,8 +71,8 @@ void TXImage::resize(int w, int h) if (w == width() && h == height()) return; int oldStrideBytes = getStride() * (format.bpp/8); - int rowsToCopy = min(h, height()); - int bytesPerRow = min(w, width()) * (format.bpp/8); + int rowsToCopy = vncmin(h, height()); + int bytesPerRow = vncmin(w, width()) * (format.bpp/8); rdr::U8* oldData = 0; bool allocData = false; diff --git a/tx/TXLabel.h b/tx/TXLabel.h index 44f70477..bbd893a5 100644 --- a/tx/TXLabel.h +++ b/tx/TXLabel.h @@ -64,8 +64,8 @@ public: int textHeight = ((defaultFS->ascent + defaultFS->descent + lineSpacing) * lines); - int newWidth = max(width(), textWidth + xPad*2); - int newHeight = max(height(), textHeight + yPad*2); + int newWidth = vncmax(width(), textWidth + xPad*2); + int newHeight = vncmax(height(), textHeight + yPad*2); if (width() < newWidth || height() < newHeight) { resize(newWidth, newHeight); } |