mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-12 19:40:28 +02:00
Automated Merge Preparation
This commit is contained in:
@@ -20,22 +20,22 @@ src/Tool/IntelliTool.cpp:4:14: warning: Member variable 'IntelliTool::Canvas' is
|
||||
IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings){
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:42:9: style: Local variable 'yMin' shadows outer variable [shadowVariable]
|
||||
int yMin = static_cast<int>(centerPoint.y()-sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||
int yMin = static_cast<int>(centerPoint.y() - sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:18:7: note: Shadowed declaration
|
||||
int yMin, yMax, xMin, xMax;
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:42:9: note: Shadow variable
|
||||
int yMin = static_cast<int>(centerPoint.y()-sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||
int yMin = static_cast<int>(centerPoint.y() - sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:43:9: style: Local variable 'yMax' shadows outer variable [shadowVariable]
|
||||
int yMax = static_cast<int>(centerPoint.y()+sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||
int yMax = static_cast<int>(centerPoint.y() + sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:18:13: note: Shadowed declaration
|
||||
int yMin, yMax, xMin, xMax;
|
||||
^
|
||||
src/Tool/IntelliToolCircle.cpp:43:9: note: Shadow variable
|
||||
int yMax = static_cast<int>(centerPoint.y()+sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||
int yMax = static_cast<int>(centerPoint.y() + sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
|
||||
^
|
||||
src/Tool/IntelliToolPolygon.h:25:6: warning: The class 'IntelliToolPolygon' defines member variable with name 'isDrawing' also defined in its parent class 'IntelliTool'. [duplInheritedMember]
|
||||
bool isDrawing;
|
||||
|
||||
@@ -14,7 +14,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
};
|
||||
|
||||
// calculates the inner angle of 'point'
|
||||
auto calculateInner = [](QPoint& point, QPoint& prev, QPoint& post){
|
||||
auto calculateInner = [] (QPoint& point, QPoint& prev, QPoint& post) {
|
||||
QPoint AP(point.x() - prev.x(), point.y() - prev.y());
|
||||
QPoint BP(point.x() - post.x(), point.y() - post.y());
|
||||
|
||||
@@ -24,7 +24,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
};
|
||||
|
||||
// gets the first element of vec for which element.isTip == true holds
|
||||
auto getTip = [](const std::vector<TriangleHelper>& vec){
|
||||
auto getTip = [] (const std::vector<TriangleHelper>& vec) {
|
||||
size_t min = 0;
|
||||
for(size_t i = 0; i<vec.size(); i++) {
|
||||
if(vec[i].interiorAngle<vec[min].interiorAngle) {
|
||||
@@ -35,17 +35,17 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
};
|
||||
|
||||
// get the vertex idx bevor idx in relation to the container length
|
||||
auto getPrev = [](int idx, int length){
|
||||
auto getPrev = [] (int idx, int length) {
|
||||
return (idx - 1)>=0 ? (idx - 1) : (length - 1);
|
||||
};
|
||||
|
||||
// get the vertex idx after idx in relation to the container lenght
|
||||
auto getPost = [](int idx, int length){
|
||||
auto getPost = [] (int idx, int length) {
|
||||
return (idx + 1) % length;
|
||||
};
|
||||
|
||||
// return if the vertex is a tip
|
||||
auto isTip = [](float angle){
|
||||
auto isTip = [] (float angle) {
|
||||
return static_cast<double>(angle)<(pi / 2.);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user