Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gen/cpp/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ non_negative_integer = "int"

[reserved]
# C++ keywords (including alternative tokens) a generated identifier must not be.
# "small" is also here though it is not a keyword: the Windows SDK's rpcndr.h
# (pulled in transitively by windows.h) #defines it to `char`, which mangles
# any generated `small` identifier before the compiler ever sees it (#354).
words = [
"alignas", "alignof", "and", "and_eq", "asm", "auto", "bitand",
"bitor", "bool", "break", "case", "catch", "char", "char8_t",
Expand All @@ -87,6 +90,7 @@ words = [
"throw", "true", "try", "typedef", "typeid", "typename", "union",
"unsigned", "using", "virtual", "void", "volatile", "wchar_t",
"while", "xor", "xor_eq",
"small",
]

# Semantic names for the synthesized content types the §2.9 projection
Expand Down
4 changes: 3 additions & 1 deletion src/include/mx/api/FontData.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ enum class CssSize
unspecified,
xxSmall,
xSmall,
small,
// Named small_, not small: the Windows SDK's rpcndr.h (pulled in
// transitively by windows.h) #defines `small` to `char` (#354).
small_,
medium,
large,
xLarge,
Expand Down
4 changes: 2 additions & 2 deletions src/private/mx/core/generated/CSSFontSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ CSSFontSize CSSFontSize::xSmall() noexcept
return CSSFontSize{Tag::xSmall};
}

CSSFontSize CSSFontSize::small() noexcept
CSSFontSize CSSFontSize::small_() noexcept
{
return CSSFontSize{Tag::small};
return CSSFontSize{Tag::small_};
}

CSSFontSize CSSFontSize::medium() noexcept
Expand Down
4 changes: 2 additions & 2 deletions src/private/mx/core/generated/CSSFontSize.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CSSFontSize final
{
xxSmall,
xSmall,
small,
small_,
medium,
large,
xLarge,
Expand All @@ -30,7 +30,7 @@ class CSSFontSize final

static CSSFontSize xxSmall() noexcept;
static CSSFontSize xSmall() noexcept;
static CSSFontSize small() noexcept;
static CSSFontSize small_() noexcept;
static CSSFontSize medium() noexcept;
static CSSFontSize large() noexcept;
static CSSFontSize xLarge() noexcept;
Expand Down
2 changes: 1 addition & 1 deletion src/private/mx/impl/Converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const Converter::EnumMap<core::LeftCenterRight, api::HorizontalAlignment> Conver

const Converter::EnumMap<core::CSSFontSize, api::CssSize> Converter::cssMap = {
{core::CSSFontSize::xxSmall(), api::CssSize::xxSmall}, {core::CSSFontSize::xSmall(), api::CssSize::xSmall},
{core::CSSFontSize::small(), api::CssSize::small}, {core::CSSFontSize::medium(), api::CssSize::medium},
{core::CSSFontSize::small_(), api::CssSize::small_}, {core::CSSFontSize::medium(), api::CssSize::medium},
{core::CSSFontSize::large(), api::CssSize::large}, {core::CSSFontSize::xLarge(), api::CssSize::xLarge},
{core::CSSFontSize::xxLarge(), api::CssSize::xxLarge},
};
Expand Down
Loading