From 4200234b9acfd63c5d481c30ac31ad8327811bbf Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Sun, 28 Dec 2008 04:08:22 -0800 Subject: [PATCH] Fix compiler warnings in nsCaret.cpp. Bug 470574, r+sr=dbaron --- layout/base/nsCaret.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index 263c3be284b..bf0b3559668 100644 --- a/layout/base/nsCaret.cpp +++ b/layout/base/nsCaret.cpp @@ -93,13 +93,13 @@ nsCaret::nsCaret() , mDrawn(PR_FALSE) , mReadOnly(PR_FALSE) , mShowDuringSelection(PR_FALSE) -, mLastContentOffset(0) -, mLastHint(nsFrameSelection::HINTLEFT) , mIgnoreUserModify(PR_TRUE) #ifdef IBMBIDI -, mLastBidiLevel(0) , mKeyboardRTL(PR_FALSE) +, mLastBidiLevel(0) #endif +, mLastContentOffset(0) +, mLastHint(nsFrameSelection::HINTLEFT) { } @@ -177,7 +177,7 @@ DrawCJKCaret(nsIFrame* aFrame, PRInt32 aOffset) const nsTextFragment* frag = content->GetText(); if (!frag) return PR_FALSE; - if (aOffset < 0 || aOffset >= frag->GetLength()) + if (aOffset < 0 || PRUint32(aOffset) >= frag->GetLength()) return PR_FALSE; PRUnichar ch = frag->CharAt(aOffset); return 0x2e80 <= ch && ch <= 0xd7ff;