Skip to content

Commit e239975

Browse files
Nir-Azremibettan
authored andcommitted
PR #14427 from remibettan: Fix string pedantic issues
2 parents 77b8fa2 + e4ddeb1 commit e239975

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

common/output-model.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,10 @@ void output_model::draw(ux_window& win, rect view_rect, device_models_list & dev
583583

584584

585585
ImGui::SetCursorPos(ImVec2(7, h - ImGui::GetTextLineHeightWithSpacing() - 2));
586-
ImGui::Text("%s", textual_icons::minus_square_o); ImGui::SameLine();
586+
std::string minus_square_icon_str = std::string(rsutils::string::from()
587+
<< textual_icons::minus_square_o);
588+
ImGui::Text("%s", minus_square_icon_str.c_str());
589+
ImGui::SameLine();
587590
ImGui::SetCursorPos(ImVec2(30, h - ImGui::GetTextLineHeightWithSpacing() - 4));
588591

589592

common/viewer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,7 +2716,7 @@ namespace rs2
27162716
std::string excl_icon_str = std::string(rsutils::string::from()
27172717
<< textual_icons::exclamation_triangle
27182718
<< " Using GLSL for processing but not for rendering can reduce CPU utilisation, but is likely to hurt overall performance!");
2719-
ImGui::Text(excl_icon_str.c_str());
2719+
ImGui::Text("%s", excl_icon_str.c_str());
27202720
ImGui::PopStyleColor();
27212721
}
27222722
#endif
@@ -2974,7 +2974,7 @@ namespace rs2
29742974
std::string excl_icon_str = std::string(rsutils::string::from()
29752975
<< textual_icons::exclamation_triangle
29762976
<< " DDS changes will take effect only after restarting the application");
2977-
ImGui::Text(excl_icon_str.c_str());
2977+
ImGui::Text("%s", excl_icon_str.c_str());
29782978
ImGui::PopStyleColor();
29792979

29802980
}
@@ -3052,7 +3052,7 @@ namespace rs2
30523052
std::string excl_icon_str = std::string(rsutils::string::from()
30533053
<< textual_icons::exclamation_triangle
30543054
<< " The application will be restarted in order for new settings to take effect");
3055-
ImGui::Text(excl_icon_str.c_str());
3055+
ImGui::Text("%s", excl_icon_str.c_str());
30563056
ImGui::PopStyleColor();
30573057
}
30583058

scripts/Tegra/LRS_Patches/02-realsense-metadata-L4T-5.0.2.patch

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
From ebead177b193c29765c36b5d9b2f2a7defa7adaa Mon Sep 17 00:00:00 2001
1+
From ff91c889746b45c0e10dad0469755c657f63aa04 Mon Sep 17 00:00:00 2001
22
From: Dmitry Perchanov <[email protected]>
33
Date: Thu, 24 Nov 2022 18:57:46 +0200
44
Subject: [PATCH] Enabling UVC Metadata attributes with L4T 5.0.2 Ubuntu 20.04.
55
Kernel 5.10
66

77
---
8-
drivers/media/usb/uvc/uvc_driver.c | 261 +++++++++++++++++++++++++++++
9-
1 file changed, 261 insertions(+)
8+
drivers/media/usb/uvc/uvc_driver.c | 270 +++++++++++++++++++++++++++++
9+
1 file changed, 270 insertions(+)
1010

1111
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
12-
index 8ed019b26e76..443bfedb516b 100644
12+
index 8ed019b26..dfdc2b047 100644
1313
--- a/drivers/media/usb/uvc/uvc_driver.c
1414
+++ b/drivers/media/usb/uvc/uvc_driver.c
15-
@@ -3350,6 +3350,267 @@ static const struct usb_device_id uvc_ids[] = {
15+
@@ -3350,6 +3350,276 @@ static const struct usb_device_id uvc_ids[] = {
1616
.bInterfaceSubClass = 1,
1717
.bInterfaceProtocol = 0,
1818
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
@@ -268,14 +268,23 @@ index 8ed019b26e76..443bfedb516b 100644
268268
+ .bInterfaceSubClass = 1,
269269
+ .bInterfaceProtocol = 0,
270270
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
271-
+ /* Intel D421 */
271+
+ /* Intel D421 */
272272
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
273273
+ | USB_DEVICE_ID_MATCH_INT_INFO,
274274
+ .idVendor = 0x8086,
275275
+ .idProduct = 0x1155,
276276
+ .bInterfaceClass = USB_CLASS_VIDEO,
277277
+ .bInterfaceSubClass = 1,
278278
+ .bInterfaceProtocol = 0,
279+
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
280+
+ /* Intel D436 */
281+
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
282+
+ | USB_DEVICE_ID_MATCH_INT_INFO,
283+
+ .idVendor = 0x8086,
284+
+ .idProduct = 0x1156,
285+
+ .bInterfaceClass = USB_CLASS_VIDEO,
286+
+ .bInterfaceSubClass = 1,
287+
+ .bInterfaceProtocol = 0,
279288
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
280289
/* Generic USB Video Class */
281290
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },

tools/depth-quality/depth-quality-model.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ namespace rs2
430430
ImGui::SetCursorPos({ pos.x + 57, pos.y + bar_spacing * (i - j) + 14 });
431431
ImGui::PushStyleColor(ImGuiCol_Text,
432432
blend(blend(light_grey, alpha), distance_guide ? 1.f : fade_factor));
433-
ImGui::Text(textual_icons::angle_right);
433+
std::string angle_right_str = std::string(rsutils::string::from()
434+
<< textual_icons::angle_right);
435+
ImGui::Text("%s", angle_right_str.c_str());
434436
ImGui::PopStyleColor();
435437
}
436438
}
@@ -445,7 +447,8 @@ namespace rs2
445447
ImGui::SetCursorPos({ pos.x + 57, pos.y + bar_spacing * (i + j) + 14 });
446448
ImGui::PushStyleColor(ImGuiCol_Text,
447449
blend(blend(light_grey, alpha), distance_guide ? 1.f : fade_factor));
448-
ImGui::Text(textual_icons::angle_left);
450+
std::string angle_left_str = std::string(rsutils::string::from() << textual_icons::angle_left);
451+
ImGui::Text("%s", angle_left_str.c_str());
449452
ImGui::PopStyleColor();
450453
}
451454
}
@@ -1240,7 +1243,9 @@ namespace rs2
12401243
auto col0 = ImGui::GetCursorPos();
12411244
ImGui::SetCursorPosX(left_x);
12421245
ImGui::PushFont(win.get_large_font());
1243-
ImGui::Text(textual_icons::angle_double_up);
1246+
std::string angle_double_up_str = std::string(rsutils::string::from()
1247+
<< textual_icons::angle_double_up);
1248+
ImGui::Text("%s", angle_double_up_str.c_str());
12441249
if (ImGui::IsItemHovered())
12451250
{
12461251
RsImGui::CustomTooltip("This metric shows positive trend");
@@ -1256,7 +1261,9 @@ namespace rs2
12561261
auto col0 = ImGui::GetCursorPos();
12571262
ImGui::SetCursorPosX(left_x);
12581263
ImGui::PushFont(win.get_large_font());
1259-
ImGui::Text(textual_icons::angle_double_down);
1264+
std::string angle_double_down_str = std::string(rsutils::string::from()
1265+
<< textual_icons::angle_double_down);
1266+
ImGui::Text("%s", angle_double_down_str.c_str());
12601267
if (ImGui::IsItemHovered())
12611268
{
12621269
RsImGui::CustomTooltip("This metric shows negative trend");

0 commit comments

Comments
 (0)