Skip to content

Commit

Permalink
Minor changes to support building with Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
stretchtiberius authored and rp- committed Feb 13, 2014
1 parent de1fb9f commit 5647fa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/antlr-2.7.7/antlr/CharScanner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# include <stdio.h>
#endif
#include <cstdio>
#include <strings.h>

#include <antlr/TokenStream.hpp>
#include <antlr/RecognitionException.hpp>
Expand Down Expand Up @@ -60,6 +59,7 @@ inline int strcasecmp(const char *s1, const char *s2)
#ifdef NO_STRCASECMP
ANTLR_C_USING(stricmp)
#else
#include <strings.h>
ANTLR_C_USING(strcasecmp)
#endif
#endif
Expand Down
6 changes: 3 additions & 3 deletions libs/qhexedit/src/qhexedit_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ void QHexEditPrivate::paintEvent(QPaintEvent *event)
{
QByteArray hex;
int xPos = _xPosHex;
for (int colIdx = 0; ((lineIdx + colIdx) < _xData.size() and (colIdx < BYTES_PER_LINE)); colIdx++)
for (int colIdx = 0; ((lineIdx + colIdx) < _xData.size() && (colIdx < BYTES_PER_LINE)); colIdx++)
{
int posBa = lineIdx + colIdx;
if ((getSelectionBegin() <= posBa) && (getSelectionEnd() > posBa))
Expand Down Expand Up @@ -702,7 +702,7 @@ void QHexEditPrivate::paintEvent(QPaintEvent *event)
for (int lineIdx = firstLineIdx, yPos = yPosStart; lineIdx < lastLineIdx; lineIdx += BYTES_PER_LINE, yPos +=_charHeight)
{
int xPosAscii = _xPosAscii;
for (int colIdx = 0; ((lineIdx + colIdx) < _xData.size() and (colIdx < BYTES_PER_LINE)); colIdx++)
for (int colIdx = 0; ((lineIdx + colIdx) < _xData.size() && (colIdx < BYTES_PER_LINE)); colIdx++)
{
painter.drawText(xPosAscii, yPos, _xData.asciiChar(lineIdx + colIdx));
xPosAscii += _charWidth;
Expand Down Expand Up @@ -761,7 +761,7 @@ int QHexEditPrivate::cursorPos(QPoint pos)
{
int result = -1;
// find char under cursor
if ((pos.x() >= _xPosHex) and (pos.x() < (_xPosHex + HEXCHARS_IN_LINE * _charWidth)))
if ((pos.x() >= _xPosHex) && (pos.x() < (_xPosHex + HEXCHARS_IN_LINE * _charWidth)))
{
int x = (pos.x() - _xPosHex) / _charWidth;
if ((x % 3) == 0)
Expand Down
4 changes: 2 additions & 2 deletions libs/qhexedit/src/xbytearray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int XByteArray::addressWidth()

void XByteArray::setAddressWidth(int width)
{
if ((width >= 0) and (width<=6))
if ((width >= 0) && (width<=6))
{
_addressNumbers = width;
}
Expand Down Expand Up @@ -134,7 +134,7 @@ QByteArray & XByteArray::replace(int index, int length, const QByteArray & ba)
QChar XByteArray::asciiChar(int index)
{
char ch = _data[index];
if ((ch < 0x20) or (ch > 0x7e))
if ((ch < 0x20) || (ch > 0x7e))
ch = '.';
return QChar(ch);
}
Expand Down

0 comments on commit 5647fa8

Please sign in to comment.