Bug 1379826 - Use static_cast instead of a C style cast in APZ keyboard logs. r?botond
MozReview-Commit-ID: 4ca18ZxQwuL
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -185,21 +185,21 @@ public:
void MarkAsNonFocusChanging() { mMayChangeFocus = false; }
~AutoFocusSequenceNumberSetter()
{
if (mMayChangeFocus) {
mFocusState.ReceiveFocusChangingEvent();
APZ_KEY_LOG("Marking input with type=%d as focus changing with seq=%" PRIu64 "\n",
- (int)mEvent.mInputType,
+ static_cast<int>(mEvent.mInputType),
mFocusState.LastAPZProcessedEvent());
} else {
APZ_KEY_LOG("Marking input with type=%d as non focus changing with seq=%" PRIu64 "\n",
- (int)mEvent.mInputType,
+ static_cast<int>(mEvent.mInputType),
mFocusState.LastAPZProcessedEvent());
}
mEvent.mFocusSequenceNumber = mFocusState.LastAPZProcessedEvent();
}
private:
FocusState& mFocusState;
--- a/gfx/layers/apz/src/FocusState.cpp
+++ b/gfx/layers/apz/src/FocusState.cpp
@@ -41,17 +41,17 @@ FocusState::ReceiveFocusChangingEvent()
void
FocusState::Update(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
const FocusTarget& aState)
{
FS_LOG("Update with rlt=%" PRIu64 ", olt=%" PRIu64 ", ft=(%d, %" PRIu64 ")\n",
aRootLayerTreeId,
aOriginatingLayersId,
- (int)aState.mType,
+ static_cast<int>(intaState.mType),
aState.mSequenceNumber);
// Update the focus tree with the latest target
mFocusTree[aOriginatingLayersId] = aState;
// Reset our internal state so we can recalculate it
mFocusHasKeyEventListeners = false;
mFocusLayersId = aRootLayerTreeId;