1 parent 6317fad commit 76edf39Copy full SHA for 76edf39
1 file changed
hand_eye_calibration/src/app/frontend.cpp
@@ -83,9 +83,10 @@ bool topicHasType(const std::vector<std::string> &types,
83
}
84
85
QString baseImageTopic(const QString &topic) {
86
- constexpr const char *suffix = "/compressed";
87
- return topic.endsWith(suffix) ? topic.left(topic.size() - std::strlen(suffix))
88
- : topic;
+ constexpr auto suffix = "/compressed";
+ constexpr qsizetype suffix_len = sizeof("/compressed") - 1;
+
89
+ return topic.endsWith(suffix) ? topic.left(topic.size() - suffix_len) : topic;
90
91
92
void appendLog(Ui::HandEyeFrontend &ui, const QString &message) {
0 commit comments