Commit 9d82ea33 authored by Leander Schulten's avatar Leander Schulten

C++: Fix compiler warnings

parent 5d85c4fa
Pipeline #287900 failed with stage
in 1 minute and 54 seconds
This diff is collapsed.
......@@ -60,7 +60,7 @@ double CurrentTimePointWrapper::getTime() const {
return 0;
}
ChannelProgrammEditor::ChannelProgrammEditor() : currentTimePointWrapper(this), modifier(0) {
ChannelProgrammEditor::ChannelProgrammEditor() : currentTimePointWrapper(this), modifier() {
setFlag(ItemHasContents, true);
setFlag(ItemIsFocusScope, true);
setAcceptedMouseButtons(Qt::AllButtons);
......@@ -385,7 +385,6 @@ void ChannelProgrammEditor::mousePressEvent(QMouseEvent *event) {
updateHoverSegment();
}
} else {
auto oldIter = currentTimePoint;
currentTimePoint = getTimePointForPosition(event->x(), event->y());
if (currentTimePoint == channelProgramm->timeline.end()) {
// no timepoints gets selected, lets select a segment
......
......@@ -97,7 +97,7 @@ private:
bool isProgramRunning(ProgramBlock *pb);
protected:
void timerEvent(QTimerEvent *event) override { run(); }
void timerEvent(QTimerEvent * /*event*/) override { run(); }
private:
/**
......
......@@ -448,7 +448,7 @@ namespace detail {
QJsonObject ob = val_.toObject();
try {
model.push_back(std::make_shared<ProgramBlock>(ob));
} catch (std::runtime_error e) {
} catch (std::runtime_error &e) {
qDebug() << "Cant parse ProgramBlock : " << e.what();
}
}
......
......@@ -157,7 +157,7 @@ void SlideShow::checkCustomShowTime(const QString &path) {
}
void SlideShow::removeImage(int index) {
if (index >= 0 && index < images.size() && imageMutex.try_lock()) {
if (index >= 0 && index < static_cast<int>(images.size()) && imageMutex.try_lock()) {
alreadyScanned.erase(images[index].filePath());
images.erase(images.cbegin() + index);
dis = std::uniform_int_distribution<size_t>(0, images.size() - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment