Skip to content

Commit

Permalink
fix warnings (and ASAN errors)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Sep 8, 2023
1 parent 4740f81 commit b286df4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PropertyValueDelegate::PropertyValueDelegate( QObject* parent ):
QItemEditorFactory* factory = new QItemEditorFactory;
QItemEditorCreatorBase* creator =
new QStandardItemEditorCreator< PositiveSpinBox >( );
factory->registerEditor( QVariant::UInt, creator );
factory->registerEditor( QMetaType::UInt, creator );
this->setItemEditorFactory( factory );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ std::tuple<unsigned char, unsigned char, unsigned char>
hsv_to_rgb(float hue, float sat, float value) {
float red, green, blue;
float fc = value * sat; // Chroma
float hue_prime = fmod(hue / 60.0f, 6);
float fx = fc * (1.0f - fabs(fmod(hue_prime, 2) - 1.0));
float hue_prime = fmod(hue / 60.0f, 6.f);
float fx = fc * (1.0f - fabs(fmod(hue_prime, 2.f) - 1.f));
float fm = value - fc;

if(0 <= hue_prime && hue_prime < 1) {
Expand Down Expand Up @@ -104,9 +104,7 @@ int main() {
float h = 360.0f * id++ / arr.number_of_faces();
float s = 0.5;
float v = 0.5;
float r, g, b;
typedef unsigned char uchar;
std::tie(r, g, b) = hsv_to_rgb(h, s, v);
auto [r, g, b] = hsv_to_rgb(h, s, v);
return CGAL::IO::Color(r,g,b);
}, "hsv colors", true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,13 +736,13 @@ class Point_2 :
swallow(is, '(');

// read values
is >> iformat(rep._m_xy);
is >> IO::iformat(rep._m_xy);
swallow(is, ',');
is >> iformat(rep._m_x);
is >> IO::iformat(rep._m_x);
swallow(is, ',');
is >> iformat(rep._m_curve);
is >> IO::iformat(rep._m_curve);
swallow(is, ',');
is >> iformat(rep._m_arcno);
is >> IO::iformat(rep._m_arcno);
swallow(is, ',');
is >> rep._m_location;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ class MainWindow : public QMainWindow
}

~MainWindow() {
delete(ui);
delete(s);
process->close();
delete(process);
delete(s);
delete(ui);
}

public Q_SLOTS:
void help() {
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
QString app = QLibraryInfo::path(QLibraryInfo::BinariesPath)
+ QDir::separator();
#if !defined(Q_OS_MAC)
app += QString("assistant");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ MainWindow::newPoints(int n)
}

void MainWindow::help() {
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
QString app = QLibraryInfo::path(QLibraryInfo::BinariesPath)
+ QDir::separator();
#if !defined(Q_OS_MAC)
app += QString("assistant");
Expand Down

0 comments on commit b286df4

Please sign in to comment.