Changeset 89875 in webkit


Ignore:
Timestamp:
Jun 27, 2011 4:16:37 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-27 Juan C. Montemayor <jmont@apple.com>

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):
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r89861 r89875  
     12011-06-27  Juan C. Montemayor  <jmont@apple.com>
     2
     3        Reviewed by Mark Rowe.
     4
     5        Indirectly including TextPosition.h and XPathGrammar.h causes compile errors
     6        https://bugs.webkit.org/show_bug.cgi?id=63392
     7       
     8        When both TextPosition.h and XPathGrammar.h are included a compile-error
     9        is caused, since XPathGrammar.h defines a macro called NUMBER and
     10        TextPosition has a typedef named NUMBER.
     11
     12        * wtf/text/TextPosition.h:
     13        (WTF::TextPosition::TextPosition):
     14        (WTF::TextPosition::minimumPosition):
     15        (WTF::TextPosition::belowRangePosition):
     16
    1172011-06-27  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/JavaScriptCore/wtf/text/TextPosition.h

    r78482 r89875  
    5757 */
    5858
    59 template<typename NUMBER>
     59template<typename T>
    6060class TextPosition {
    6161public:
    62     TextPosition(NUMBER line, NUMBER column)
     62    TextPosition(T line, T column)
    6363        : m_line(line)
    6464        , m_column(column)
     
    6666    }
    6767    TextPosition() {}
    68 
    6968    bool operator==(const TextPosition& other) { return m_line == other.m_line && m_column == other.m_column; }
    7069    bool operator!=(const TextPosition& other) { return !((*this) == other); }
    7170
    7271    // A 'minimum' value of position, used as a default value.
    73     static TextPosition<NUMBER> minimumPosition() { return TextPosition<NUMBER>(NUMBER::base(), NUMBER::base()); }
     72    static TextPosition<T> minimumPosition() { return TextPosition<T>(T::base(), T::base()); }
    7473
    7574    // A value with line value less than a minimum; used as an impossible position.
    76     static TextPosition<NUMBER> belowRangePosition() { return TextPosition<NUMBER>(NUMBER::belowBase(), NUMBER::belowBase()); }
     75    static TextPosition<T> belowRangePosition() { return TextPosition<T>(T::belowBase(), T::belowBase()); }
    7776
    78     NUMBER m_line;
    79     NUMBER m_column;
     77    T m_line;
     78    T m_column;
    8079};
    8180
Note: See TracChangeset for help on using the changeset viewer.