Changeset 89875 in webkit
- Timestamp:
- Jun 27, 2011 4:16:37 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r89861 r89875 1 2011-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 1 17 2011-06-27 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/JavaScriptCore/wtf/text/TextPosition.h
r78482 r89875 57 57 */ 58 58 59 template<typename NUMBER>59 template<typename T> 60 60 class TextPosition { 61 61 public: 62 TextPosition( NUMBER line, NUMBERcolumn)62 TextPosition(T line, T column) 63 63 : m_line(line) 64 64 , m_column(column) … … 66 66 } 67 67 TextPosition() {} 68 69 68 bool operator==(const TextPosition& other) { return m_line == other.m_line && m_column == other.m_column; } 70 69 bool operator!=(const TextPosition& other) { return !((*this) == other); } 71 70 72 71 // 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()); } 74 73 75 74 // 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()); } 77 76 78 NUMBERm_line;79 NUMBERm_column;77 T m_line; 78 T m_column; 80 79 }; 81 80
Note: See TracChangeset
for help on using the changeset viewer.