Browse Source

Replaced IN with INCH in Property::Unit enum

IN is already defined on Windows (WinDef.h).
hoshi10 13 years ago
parent
commit
5a76104b26

+ 2 - 2
Include/Rocket/Core/Property.h

@@ -63,12 +63,12 @@ public:
 		RELATIVE_UNIT = EM | PERCENT,
 
 		// Values based on pixels-per-inch.
-		IN = 1 << 8,				// number suffixed by 'in'; fetch as < float >
+		INCH = 1 << 8,				// number suffixed by 'in'; fetch as < float >
 		CM = 1 << 9,				// number suffixed by 'cm'; fetch as < float >
 		MM = 1 << 10,				// number suffixed by 'mm'; fetch as < float >
 		PT = 1 << 11,				// number suffixed by 'pt'; fetch as < float >
 		PC = 1 << 12,				// number suffixed by 'pc'; fetch as < float >
-		PPI_UNIT = IN | CM | MM | PT | PC
+		PPI_UNIT = INCH | CM | MM | PT | PC
 	};
 
 	Property();

+ 1 - 1
Source/Core/PropertyDefinition.cpp

@@ -134,7 +134,7 @@ bool PropertyDefinition::GetValue(String& value, const Property& property) const
 		case Property::PX:		value.Append("px"); break;
 		case Property::EM:		value.Append("em"); break;
 		case Property::PERCENT:	value.Append("%"); break;
-		case Property::IN:		value.Append("in"); break;
+		case Property::INCH:	value.Append("in"); break;
 		case Property::CM:		value.Append("cm"); break;
 		case Property::MM:		value.Append("mm"); break;
 		case Property::PT:		value.Append("pt"); break;

+ 1 - 1
Source/Core/PropertyParserNumber.cpp

@@ -35,7 +35,7 @@ PropertyParserNumber::PropertyParserNumber()
 {
 	unit_suffixes.push_back(UnitSuffix(Property::PX, "px"));
 	unit_suffixes.push_back(UnitSuffix(Property::EM, "em"));
-	unit_suffixes.push_back(UnitSuffix(Property::IN, "in"));
+	unit_suffixes.push_back(UnitSuffix(Property::INCH, "in"));
 	unit_suffixes.push_back(UnitSuffix(Property::CM, "cm"));
 	unit_suffixes.push_back(UnitSuffix(Property::MM, "mm"));
 	unit_suffixes.push_back(UnitSuffix(Property::PT, "pt"));