From 7bddce7e20ac14024ec84762668fca98a3e2c7c2 Mon Sep 17 00:00:00 2001 From: Oliver Sander Date: Sat, 20 Apr 2024 06:46:11 +0200 Subject: Remove redundant conditional The condition u[i] < 0x7F was checked twice. --- utils/HtmlOutputDev.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index a3f9a614..36e9dc76 100644 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -43,7 +43,7 @@ // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, . Work sponsored by the LiMux project of the city of Munich // Copyright (C) 2018 Thibaut Brard // Copyright (C) 2018-2020 Adam Reichold -// Copyright (C) 2019, 2020, 2022 Oliver Sander +// Copyright (C) 2019, 2020, 2022, 2024 Oliver Sander // Copyright (C) 2020 Eddie Kohler // Copyright (C) 2021 Christopher Hasse // Copyright (C) 2022 Brian Rosenfield @@ -148,7 +148,7 @@ static std::unique_ptr print_uni_str(const Unicode *u, const unsigned std::unique_ptr gstr_buff0 = GooString::format("{0:c}", (*u < 0x7F ? *u & 0xFF : '?')); for (unsigned i = 1; i < uLen; i++) { if (u[i] < 0x7F) { - gstr_buff0->append(u[i] < 0x7F ? static_cast(u[i]) & 0xFF : '?'); + gstr_buff0->append(static_cast(u[i]) & 0xFF); } } -- cgit v1.2.3