summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent PINON <vincent.pinon@laposte.net>2014-05-05 06:03:09 (GMT)
committerVincent PINON <vincent.pinon@laposte.net>2014-05-05 06:05:34 (GMT)
commit640d2a977c8e8411df9f2a36fb9d43ea4dd96c3b (patch)
tree0e74522d374ddff2c3153e0322a8ed70ee2c535d
parentf26b41fc18a941378cee59c43505d88ba2c9740a (diff)
Cppcheck fixs
-rw-r--r--src/clipitem.cpp4
-rw-r--r--src/customtrackview.cpp8
-rw-r--r--src/lib/external/kiss_fft/tools/kiss_fastfir.c3
3 files changed, 6 insertions, 9 deletions
diff --git a/src/clipitem.cpp b/src/clipitem.cpp
index a44d5e3..b7c566f 100644
--- a/src/clipitem.cpp
+++ b/src/clipitem.cpp
@@ -1397,11 +1397,11 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
items = scene()->items(sceneShape, Qt::IntersectsItemShape);
items.removeAll(this);
bool forwardMove = newPos.x() > pos().x();
- int offset = 0;
if (!items.isEmpty()) {
for (int i = 0; i < items.count(); ++i) {
if (!items.at(i)->isEnabled()) continue;
if (items.at(i)->type() == type()) {
+ int offset = 0;
// Collision!
QPointF otherPos = items.at(i)->pos();
if ((int) otherPos.y() != (int) pos().y()) {
@@ -1807,7 +1807,7 @@ void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event)
// single effect dropped
e.removeAttribute("kdenlive_ix");
}
- CustomTrackView *view = (CustomTrackView *) scene()->views().first();
+ CustomTrackView *view = static_cast<CustomTrackView*>(scene()->views().first());
if (view) view->slotDropEffect(this, e, m_info.startPos, track());
}
else return;
diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp
index 02ad481..f4d7a6f 100644
--- a/src/customtrackview.cpp
+++ b/src/customtrackview.cpp
@@ -491,9 +491,9 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
QString offset = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration() - m_dragItemInfo.cropDuration, KdenliveSettings::frametimecode());
emit displayMessage(i18n("Duration:") + ' ' + duration + ' ' + i18n("Offset:") + ' ' + offset, InformationMessage);
} else if (m_operationMode == FadeIn && move) {
- ((ClipItem*) m_dragItem)->setFadeIn(static_cast<int>(mappedXPos - m_dragItem->startPos().frames(m_document->fps())));
+ static_cast<ClipItem*>(m_dragItem)->setFadeIn(static_cast<int>(mappedXPos - m_dragItem->startPos().frames(m_document->fps())));
} else if (m_operationMode == FadeOut && move) {
- ((ClipItem*) m_dragItem)->setFadeOut(static_cast<int>(m_dragItem->endPos().frames(m_document->fps()) - mappedXPos));
+ static_cast<ClipItem*>(m_dragItem)->setFadeOut(static_cast<int>(m_dragItem->endPos().frames(m_document->fps()) - mappedXPos));
} else if (m_operationMode == KeyFrame && move) {
GenTime keyFramePos = GenTime(mappedXPos, m_document->fps()) - m_dragItem->startPos() + m_dragItem->cropStart();
double pos = mapToScene(event->pos()).toPoint().y();
@@ -3571,7 +3571,7 @@ void CustomTrackView::deleteClip(const QString &clipId)
int count = 0;
for (int i = 0; i < itemList.count(); ++i) {
if (itemList.at(i)->type() == AVWidget) {
- ClipItem *item = (ClipItem *)itemList.at(i);
+ ClipItem *item = static_cast<ClipItem*>(itemList.at(i));
if (item->clipProducer() == clipId) {
count++;
if (item->parentItem()) {
@@ -3717,7 +3717,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
for (int i = 0; i < items.count(); ++i) {
if (items.at(i)->type() == GroupWidget) {
- AbstractGroupItem* group = (AbstractGroupItem*)items.at(i);
+ AbstractGroupItem* group = static_cast<AbstractGroupItem*>(items.at(i));
if (!groups.contains(group)) groups.append(group);
items += items.at(i)->childItems();
}
diff --git a/src/lib/external/kiss_fft/tools/kiss_fastfir.c b/src/lib/external/kiss_fft/tools/kiss_fastfir.c
index eed90ab..d68ddb7 100644
--- a/src/lib/external/kiss_fft/tools/kiss_fastfir.c
+++ b/src/lib/external/kiss_fft/tools/kiss_fastfir.c
@@ -252,9 +252,6 @@ void direct_file_filter(
size_t nbuf;
size_t oldestlag = 0;
size_t k, tap;
-#ifndef REAL_FASTFIR
- kffsamp_t tmp;
-#endif
nbuf = 4096;
buf = (kffsamp_t *) malloc ( sizeof (kffsamp_t) * nbuf);