Bug 728480: Wrap MOZ_TOUCH-specific code in #ifdefs, to prevent unused-function build warnings. r=wesj
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 17 Feb 2012 17:27:39 -0800
changeset 87146 7c5b5e3cedddd389f790171a9bccc1888a0d9333
parent 87145 e423d872f94ff6cf4635d789dacebf44076e5b35
child 87147 aaed6b9c89528ad6360ca2acbed3adcc74a83a96
push id22083
push userbmo@edmorley.co.uk
push dateSat, 18 Feb 2012 11:19:19 +0000
treeherdermozilla-central@20478b673212 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs728480
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 728480: Wrap MOZ_TOUCH-specific code in #ifdefs, to prevent unused-function build warnings. r=wesj
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5759,16 +5759,17 @@ PresShell::RecordMouseLocation(nsGUIEven
     printf("[ps=%p]got mouse exit for %p\n",
            this, aEvent->widget);
     printf("[ps=%p]clearing mouse location\n",
            this);
 #endif
   }
 }
 
+#ifdef MOZ_TOUCH
 static void
 EvictTouchPoint(nsCOMPtr<nsIDOMTouch>& aTouch)
 {
   nsIWidget *widget = nsnull;
   // is there an easier/better way to dig out the widget?
   nsCOMPtr<nsINode> node(do_QueryInterface(aTouch->GetTarget()));
   if (!node) {
     return;
@@ -5806,16 +5807,17 @@ EvictTouchPoint(nsCOMPtr<nsIDOMTouch>& a
 static PLDHashOperator
 AppendToTouchList(const PRUint32& aKey, nsCOMPtr<nsIDOMTouch>& aData, void *aTouchList)
 {
   nsTArray<nsCOMPtr<nsIDOMTouch> > *touches = static_cast<nsTArray<nsCOMPtr<nsIDOMTouch> > *>(aTouchList);
   aData->mChanged = false;
   touches->AppendElement(aData);
   return PL_DHASH_NEXT;
 }
+#endif // MOZ_TOUCH
 
 nsresult
 PresShell::HandleEvent(nsIFrame        *aFrame,
                        nsGUIEvent*     aEvent,
                        bool            aDontRetargetEvents,
                        nsEventStatus*  aEventStatus)
 {
   NS_ASSERTION(aFrame, "null frame");