Skip to content

Commit

Permalink
[Sketcher] Update string comparison from C to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
Syres916 authored Nov 16, 2024
1 parent e05286c commit f4027d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ class DrawSketchHandlerCarbonCopy: public DrawSketchHandler
throw Base::ValueError("Sketcher: Carbon Copy: Invalid object in selection");
}

if (obj->is<Sketcher::SketchObject>()) {
std::string sketchArchType ("Sketcher::SketchObjectPython");

if (obj->is<Sketcher::SketchObject>()
|| sketchArchType.compare(obj->getTypeId().getName()) == 0) {

Check warning on line 166 in src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h

View workflow job for this annotation

GitHub Actions / Lint / Lint

do not use 'compare' to test equality of strings; use the string equality operator instead [readability-string-compare]

try {
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create a carbon copy"));
Expand Down

0 comments on commit f4027d8

Please sign in to comment.