Title: [89875] trunk/Source/_javascript_Core
Revision
89875
Author
[email protected]
Date
2011-06-27 16:16:37 -0700 (Mon, 27 Jun 2011)

Log Message

2011-06-27  Juan C. Montemayor  <[email protected]>

        Reviewed by Mark Rowe.

        Indirectly including TextPosition.h and XPathGrammar.h causes compile errors
        https://bugs.webkit.org/show_bug.cgi?id=63392

        When both TextPosition.h and XPathGrammar.h are included a compile-error
        is caused, since XPathGrammar.h defines a macro called NUMBER and
        TextPosition has a typedef named NUMBER.

        * wtf/text/TextPosition.h:
        (WTF::TextPosition::TextPosition):
        (WTF::TextPosition::minimumPosition):
        (WTF::TextPosition::belowRangePosition):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (89874 => 89875)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-27 23:09:23 UTC (rev 89874)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-27 23:16:37 UTC (rev 89875)
@@ -1,3 +1,19 @@
+2011-06-27  Juan C. Montemayor  <[email protected]>
+
+        Reviewed by Mark Rowe.
+
+        Indirectly including TextPosition.h and XPathGrammar.h causes compile errors
+        https://bugs.webkit.org/show_bug.cgi?id=63392
+        
+        When both TextPosition.h and XPathGrammar.h are included a compile-error
+        is caused, since XPathGrammar.h defines a macro called NUMBER and 
+        TextPosition has a typedef named NUMBER.
+
+        * wtf/text/TextPosition.h:
+        (WTF::TextPosition::TextPosition):
+        (WTF::TextPosition::minimumPosition):
+        (WTF::TextPosition::belowRangePosition):
+
 2011-06-27  Filip Pizlo  <[email protected]>
 
         Reviewed by Gavin Barraclough.

Modified: trunk/Source/_javascript_Core/wtf/text/TextPosition.h (89874 => 89875)


--- trunk/Source/_javascript_Core/wtf/text/TextPosition.h	2011-06-27 23:09:23 UTC (rev 89874)
+++ trunk/Source/_javascript_Core/wtf/text/TextPosition.h	2011-06-27 23:16:37 UTC (rev 89875)
@@ -56,27 +56,26 @@
  * int-receiving constructors are hidden from API.
  */
 
-template<typename NUMBER>
+template<typename T>
 class TextPosition {
 public:
-    TextPosition(NUMBER line, NUMBER column)
+    TextPosition(T line, T column)
         : m_line(line)
         , m_column(column)
     {
     }
     TextPosition() {}
-
     bool operator==(const TextPosition& other) { return m_line == other.m_line && m_column == other.m_column; }
     bool operator!=(const TextPosition& other) { return !((*this) == other); }
 
     // A 'minimum' value of position, used as a default value.
-    static TextPosition<NUMBER> minimumPosition() { return TextPosition<NUMBER>(NUMBER::base(), NUMBER::base()); }
+    static TextPosition<T> minimumPosition() { return TextPosition<T>(T::base(), T::base()); }
 
     // A value with line value less than a minimum; used as an impossible position.
-    static TextPosition<NUMBER> belowRangePosition() { return TextPosition<NUMBER>(NUMBER::belowBase(), NUMBER::belowBase()); }
+    static TextPosition<T> belowRangePosition() { return TextPosition<T>(T::belowBase(), T::belowBase()); }
 
-    NUMBER m_line;
-    NUMBER m_column;
+    T m_line;
+    T m_column;
 };
 
 class OneBasedNumber;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to