From 1716451033063812056349156332128984540962 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Tue, 7 Nov 2023 18:55:32 -0500 Subject: Add fmt library to api --- ui/util.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/util.h b/ui/util.h index c3e5ece5..e6b6fdb2 100644 --- a/ui/util.h +++ b/ui/util.h @@ -18,7 +18,7 @@ std::string BINARYNINJAUIAPI getStringForLocalVariable(ArchitectureRef arch, Fun std::string BINARYNINJAUIAPI getStringForRegisterValue(ArchitectureRef arch, BinaryNinja::RegisterValue value); std::string BINARYNINJAUIAPI getPossibleValueSetStateName(BNRegisterValueType state); std::string BINARYNINJAUIAPI getStringForIntegerValue(int64_t value); -std::string BINARYNINJAUIAPI getStringForIntegerValue(uint64_t value); +std::string BINARYNINJAUIAPI getStringForUIntegerValue(uint64_t value); std::string BINARYNINJAUIAPI getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values); std::string BINARYNINJAUIAPI getStringForInstructionDataflowDetails(BinaryViewRef data, ArchitectureRef arch, FunctionRef func, uint64_t address); std::optional BINARYNINJAUIAPI getPossibleValueSetForToken(View* view, BinaryViewRef data, ArchitectureRef arch, @@ -34,6 +34,16 @@ bool BINARYNINJAUIAPI isBinaryNinjaDataBase(QFileInfo& info, QFileAccessor& acce PlatformRef BINARYNINJAUIAPI getOrAskForPlatform(QWidget* parent, BinaryViewRef data); PlatformRef BINARYNINJAUIAPI getOrAskForPlatform(QWidget* parent, PlatformRef defaultValue); + +namespace fmt +{ + template + QString qformat(format_string fmt, T&&... args) + { + return QString::fromStdString(vformat(fmt, make_format_args(args...))); + } +} + /*! @} */ -- cgit v1.3.1