diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-18 23:07:11 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-18 23:07:11 -0700 |
commit | 129b531c9c67fc50ef9dcb7d28d7081546213ac1 (patch) | |
tree | a8b4769c0d461caddac853ce26db0058acc710df /llvm/tools/llvm-rc | |
parent | 1e556f459b44dd0ca4073e932f66ecb6f40fe31a (diff) | |
download | llvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.zip llvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.tar.gz llvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.tar.bz2 |
[llvm] Use value_or instead of getValueOr (NFC)
Diffstat (limited to 'llvm/tools/llvm-rc')
-rw-r--r-- | llvm/tools/llvm-rc/ResourceFileWriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.cpp b/llvm/tools/llvm-rc/ResourceFileWriter.cpp index 8662320..c1b4921 100644 --- a/llvm/tools/llvm-rc/ResourceFileWriter.cpp +++ b/llvm/tools/llvm-rc/ResourceFileWriter.cpp @@ -988,8 +988,8 @@ Error ResourceFileWriter::writeSingleDialogControl(const Control &Ctl, auto TypeInfo = Control::SupportedCtls.lookup(Ctl.Type); IntWithNotMask CtlStyle(TypeInfo.Style); - CtlStyle |= Ctl.Style.getValueOr(RCInt(0)); - uint32_t CtlExtStyle = Ctl.ExtStyle.getValueOr(0); + CtlStyle |= Ctl.Style.value_or(RCInt(0)); + uint32_t CtlExtStyle = Ctl.ExtStyle.value_or(0); // DIALOG(EX) item header prefix. if (!IsExtended) { @@ -1003,7 +1003,7 @@ Error ResourceFileWriter::writeSingleDialogControl(const Control &Ctl, ulittle32_t HelpID; ulittle32_t ExtStyle; ulittle32_t Style; - } Prefix{ulittle32_t(Ctl.HelpID.getValueOr(0)), ulittle32_t(CtlExtStyle), + } Prefix{ulittle32_t(Ctl.HelpID.value_or(0)), ulittle32_t(CtlExtStyle), ulittle32_t(CtlStyle.getValue())}; writeObject(Prefix); } @@ -1059,7 +1059,7 @@ Error ResourceFileWriter::writeDialogBody(const RCResource *Base) { const uint32_t StyleFontFlag = 0x40; const uint32_t StyleCaptionFlag = 0x00C00000; - uint32_t UsedStyle = ObjectData.Style.getValueOr(DefaultStyle); + uint32_t UsedStyle = ObjectData.Style.value_or(DefaultStyle); if (ObjectData.Font) UsedStyle |= StyleFontFlag; else @@ -1071,7 +1071,7 @@ Error ResourceFileWriter::writeDialogBody(const RCResource *Base) { UsedStyle |= StyleCaptionFlag; const uint16_t DialogExMagic = 0xFFFF; - uint32_t ExStyle = ObjectData.ExStyle.getValueOr(0); + uint32_t ExStyle = ObjectData.ExStyle.value_or(0); // Write DIALOG(EX) header prefix. These are pretty different. if (!Res->IsExtended) { |