From ce10f30aa6459e8524206d3660af9958fec075c8 Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 25 Mar 2025 00:08:24 +0100 Subject: [PATCH] [mod] clean code clean --- src/Mod/CAM/PathSimulator/AppGL/MillMotion.h | 2 +- src/Mod/Cloud/App/AppCloud.cpp | 21 +------------------ src/Mod/Material/Gui/ArrayDelegate.cpp | 2 -- src/Mod/Material/Gui/ListDelegate.cpp | 1 - src/Mod/Part/App/ExtrusionHelper.cpp | 1 - src/Mod/TechDraw/App/DrawBrokenView.cpp | 1 - .../App/TopoShapeMakeShapeWithElementMap.cpp | 1 - 7 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/Mod/CAM/PathSimulator/AppGL/MillMotion.h b/src/Mod/CAM/PathSimulator/AppGL/MillMotion.h index 9b9f1d2afd..e6b854a3b7 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/MillMotion.h +++ b/src/Mod/CAM/PathSimulator/AppGL/MillMotion.h @@ -22,7 +22,7 @@ #ifndef __mill_operation_h__ #define __mill_operation_h__ -// #include + #include "EndMill.h" #include "linmath.h" namespace MillSim diff --git a/src/Mod/Cloud/App/AppCloud.cpp b/src/Mod/Cloud/App/AppCloud.cpp index 122c82a72f..6d26780d4e 100644 --- a/src/Mod/Cloud/App/AppCloud.cpp +++ b/src/Mod/Cloud/App/AppCloud.cpp @@ -348,23 +348,7 @@ void Cloud::CloudWriter::createBucket() curl_easy_cleanup(curl); } } -// -// #if defined(FC_OS_WIN32) -// -// #include -// #undef timezone -// -// -// int gettimeofday( time_t* tp, struct timezone* tzp) { -// namespace sc = std::chrono; -// sc::system_clock::duration d = sc::system_clock::now().time_since_epoch(); -// sc::seconds s = sc::duration_cast(d); -// tp->tv_sec = s.count(); -// tp->tv_usec = sc::duration_cast(d - s).count(); -// -// return 0; -//} -// #endif + struct Cloud::AmzDatav4* Cloud::ComputeDigestAmzS3v4(char* operation, const char* server, @@ -639,7 +623,6 @@ Cloud::BuildHeaderAmzS3v4(const char* URL, const char* PublicKey, struct Cloud:: struct curl_slist* chunk = nullptr; // Build the Host: entry - // sprintf(header_data,"Host: %s:%s", URL, TCPPort); sprintf(header_data, "Host: %s", URL); chunk = curl_slist_append(chunk, header_data); @@ -1314,7 +1297,6 @@ void Cloud::CloudWriter::pushCloud(const char* FileName, const char* data, long void Cloud::CloudWriter::writeFiles(void) { - // use a while loop because it is possible that while // processing the files, new ones can be added std::string tmp = ""; @@ -1505,7 +1487,6 @@ bool Cloud::Module::cloudRestore(const char* BucketName) doc->setStatus(Document::Restoring, true); try { - // Document::Restore(reader); doc->Restore(reader); } catch (const Base::Exception& e) { diff --git a/src/Mod/Material/Gui/ArrayDelegate.cpp b/src/Mod/Material/Gui/ArrayDelegate.cpp index 91ff581927..0ceebb9519 100644 --- a/src/Mod/Material/Gui/ArrayDelegate.cpp +++ b/src/Mod/Material/Gui/ArrayDelegate.cpp @@ -42,7 +42,6 @@ #include #include #include -// #include #include #include @@ -67,7 +66,6 @@ void ArrayDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - if (_type == Materials::MaterialValue::Quantity) { auto* tableModel = dynamic_cast(index.model()); painter->save(); diff --git a/src/Mod/Material/Gui/ListDelegate.cpp b/src/Mod/Material/Gui/ListDelegate.cpp index bcef1f752a..b725216818 100644 --- a/src/Mod/Material/Gui/ListDelegate.cpp +++ b/src/Mod/Material/Gui/ListDelegate.cpp @@ -42,7 +42,6 @@ #include #include #include -// #include #include #include diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index 64af79e8b6..aabafa7141 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -43,7 +43,6 @@ #include #include #include -// #include #include "ExtrusionHelper.h" #include "TopoShape.h" diff --git a/src/Mod/TechDraw/App/DrawBrokenView.cpp b/src/Mod/TechDraw/App/DrawBrokenView.cpp index af7c91fc54..170b09cd3a 100644 --- a/src/Mod/TechDraw/App/DrawBrokenView.cpp +++ b/src/Mod/TechDraw/App/DrawBrokenView.cpp @@ -86,7 +86,6 @@ #include "GeometryObject.h" #include "ShapeExtractor.h" #include "ShapeUtils.h" -// #include "Preferences.h" #include "DrawBrokenView.h" #include "DrawBrokenViewPy.h" diff --git a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp index 47e74f980b..a0f8bbabc6 100644 --- a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp +++ b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp @@ -8,7 +8,6 @@ #include "PartTestHelpers.h" #include #include -// #include #include #include