From f34dbf2aa9e17a320edf62a6c16573e02468fba5 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 12 Mar 2023 11:09:11 +0000 Subject: [PATCH] Fix a libfmt compilation error on master `InfoString` is a `StringOrView` and libfmt does not know how to print that. Pass it a `string_view` instead. --- Source/objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/objects.cpp b/Source/objects.cpp index b064c6567..d8cc11d7f 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -4896,12 +4896,12 @@ void GetObjectStr(const Object &object) InfoString = object.name(); if (MyPlayer->_pClass == HeroClass::Rogue) { if (object._oTrapFlag) { - InfoString = fmt::format(fmt::runtime(_(/* TRANSLATORS: {:s} will either be a chest or a door */ "Trapped {:s}")), InfoString); + InfoString = fmt::format(fmt::runtime(_(/* TRANSLATORS: {:s} will either be a chest or a door */ "Trapped {:s}")), InfoString.str()); InfoColor = UiFlags::ColorRed; } } if (object.IsDisabled()) { - InfoString = fmt::format(fmt::runtime(_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls lever */ "{:s} (disabled)")), InfoString); + InfoString = fmt::format(fmt::runtime(_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls lever */ "{:s} (disabled)")), InfoString.str()); InfoColor = UiFlags::ColorRed; } }