Skip to content

Commit ee2cb93

Browse files
Merge pull request #592 from IENT/fix/compileWarningsMac
warning fixes
2 parents b3c33f0 + 73bfb1d commit ee2cb93

File tree

3 files changed

+60
-40
lines changed

3 files changed

+60
-40
lines changed

YUViewLib/src/parser/HEVC/Extensions/sps_scc_extension.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void sps_scc_extension::parse(SubByteReaderLogging &reader,
6161
const auto numComps = (chroma_format_idc == 0) ? 1 : 3;
6262
for (int comp = 0; comp < numComps; comp++)
6363
{
64-
for (int i = 0; i <= this->sps_num_palette_predictor_initializers_minus1; i++)
64+
for (unsigned i = 0; i <= this->sps_num_palette_predictor_initializers_minus1; i++)
6565
{
6666
// There is an issue in the HEVC spec here. It is missing the number of bits that are used
6767
// to code this symbol. From the SCC reference software I was able to deduce that it

YUViewLib/src/parser/HEVC/Extensions/vps_extension.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace parser::hevc
4141

4242
using namespace reader;
4343

44-
void vps_extension::parse(SubByteReaderLogging & reader,
44+
void vps_extension::parse(SubByteReaderLogging &reader,
4545
const unsigned vps_max_layers_minus1,
4646
const bool vps_base_layer_internal_flag,
4747
const unsigned vps_max_sub_layers_minus1,
@@ -67,7 +67,7 @@ void vps_extension::parse(SubByteReaderLogging & reader,
6767
NumScalabilityTypes++;
6868
}
6969

70-
for (unsigned j = 0; j < (NumScalabilityTypes - (this->splitting_flag) ? 1u : 0u); j++)
70+
for (unsigned j = 0; j < ((NumScalabilityTypes - (this->splitting_flag)) ? 1u : 0u); j++)
7171
this->dimension_id_len_minus1.push_back(
7272
reader.readBits(formatArray("dimension_id_len_minus1", j), 3));
7373

YUViewLib/src/ui/Mainwindow.cpp

+57-37
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ MainWindow::MainWindow(bool useAlternativeSources, QWidget *parent) : QMainWindo
8888
&QWidget::setVisible);
8989

9090
// Connect the playlistWidget signals to some slots
91-
auto const fileInfoAdapter = [this] {
91+
auto const fileInfoAdapter = [this]
92+
{
9293
auto items = ui.playlistTreeWidget->getSelectedItems();
9394
ui.fileInfoWidget->setInfo(items[0] ? items[0]->getInfo() : InfoData(),
9495
items[1] ? items[1]->getInfo() : InfoData());
@@ -101,11 +102,14 @@ MainWindow::MainWindow(bool useAlternativeSources, QWidget *parent) : QMainWindo
101102
&PlaylistTreeWidget::selectedItemChanged,
102103
ui.fileInfoWidget,
103104
fileInfoAdapter);
104-
connect(ui.fileInfoWidget, &FileInfoWidget::infoButtonClicked, [this](int infoIndex, int row) {
105-
auto items = ui.playlistTreeWidget->getSelectedItems();
106-
if (items[infoIndex])
107-
items[infoIndex]->infoListButtonPressed(row);
108-
});
105+
connect(ui.fileInfoWidget,
106+
&FileInfoWidget::infoButtonClicked,
107+
[this](int infoIndex, int row)
108+
{
109+
auto items = ui.playlistTreeWidget->getSelectedItems();
110+
if (items[infoIndex])
111+
items[infoIndex]->infoListButtonPressed(row);
112+
});
109113
connect(ui.playlistTreeWidget,
110114
&PlaylistTreeWidget::selectionRangeChanged,
111115
ui.playbackController,
@@ -174,7 +178,8 @@ MainWindow::MainWindow(bool useAlternativeSources, QWidget *parent) : QMainWindo
174178
restoreGeometry(settings.value("mainWindow/geometry").toByteArray());
175179
restoreState(settings.value("mainWindow/windowState").toByteArray(), QT_VERSION);
176180
separateViewWindow.restoreGeometry(settings.value("separateViewWindow/geometry").toByteArray());
177-
separateViewWindow.restoreState(settings.value("separateViewWindow/windowState").toByteArray(), QT_VERSION);
181+
separateViewWindow.restoreState(settings.value("separateViewWindow/windowState").toByteArray(),
182+
QT_VERSION);
178183
}
179184

180185
connect(ui.openButton, &QPushButton::clicked, this, &MainWindow::showFileOpenDialog);
@@ -239,11 +244,12 @@ void MainWindow::loadFiles(const QStringList &files)
239244

240245
void MainWindow::createMenusAndActions()
241246
{
242-
auto addActionToMenu = [this](QMenu * menu,
247+
auto addActionToMenu = [this](QMenu *menu,
243248
QString name,
244249
auto reciever,
245250
auto functionPointer,
246-
const QKeySequence shortcut = {}) {
251+
const QKeySequence shortcut = {})
252+
{
247253
(void)this; // QObject::connect uses this
248254
auto action = new QAction(name, menu);
249255
action->setShortcut(shortcut);
@@ -357,12 +363,13 @@ void MainWindow::createMenusAndActions()
357363

358364
auto dockPanelsMenu = viewMenu->addMenu("Dock Panels");
359365
auto addDockViewAction =
360-
[dockPanelsMenu](QDockWidget *dockWidget, QString text, const QKeySequence &shortcut = {}) {
361-
auto action = dockWidget->toggleViewAction();
362-
action->setText(text);
363-
action->setShortcut(shortcut);
364-
dockPanelsMenu->addAction(action);
365-
};
366+
[dockPanelsMenu](QDockWidget *dockWidget, QString text, const QKeySequence &shortcut = {})
367+
{
368+
auto action = dockWidget->toggleViewAction();
369+
action->setText(text);
370+
action->setShortcut(shortcut);
371+
dockPanelsMenu->addAction(action);
372+
};
366373
addDockViewAction(ui.playlistDockWidget, "Show P&laylist", Qt::CTRL | Qt::Key_L);
367374
addDockViewAction(ui.propertiesDock, "Show &Properties", Qt::CTRL | Qt::Key_P);
368375
addDockViewAction(ui.fileInfoDock, "Show &Info", Qt::CTRL | Qt::Key_I);
@@ -413,7 +420,8 @@ void MainWindow::createMenusAndActions()
413420
&PlaybackController::previousFrame,
414421
Qt::Key_Left);
415422

416-
auto addLambdaActionToMenu = [this](QMenu *menu, const QString name, auto lambda) {
423+
auto addLambdaActionToMenu = [](QMenu *menu, const QString name, auto lambda)
424+
{
417425
auto action = new QAction(name, menu);
418426
QObject::connect(action, &QAction::triggered, lambda);
419427
menu->addAction(action);
@@ -423,31 +431,43 @@ void MainWindow::createMenusAndActions()
423431
addActionToMenu(helpMenu, "About YUView", this, &MainWindow::showAbout);
424432
addActionToMenu(helpMenu, "Help", this, &MainWindow::showHelp);
425433
helpMenu->addSeparator();
426-
addLambdaActionToMenu(helpMenu, "Open Project Website...", []() {
427-
QDesktopServices::openUrl(QUrl("https://github.com/IENT/YUView"));
428-
});
434+
addLambdaActionToMenu(helpMenu,
435+
"Open Project Website...",
436+
[]()
437+
{ QDesktopServices::openUrl(QUrl("https://github.com/IENT/YUView")); });
429438
addLambdaActionToMenu(
430439
helpMenu, "Check for new version", [this]() { this->updater->startCheckForNewVersion(); });
431440

432441
auto downloadsMenu = helpMenu->addMenu("Downloads");
433-
addLambdaActionToMenu(downloadsMenu, "libde265 HEVC decoder", []() {
434-
QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/libde265/releases"));
435-
});
436-
addLambdaActionToMenu(downloadsMenu, "HM reference HEVC decoder", []() {
437-
QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/libHM/releases"));
438-
});
439-
addLambdaActionToMenu(downloadsMenu, "VTM VVC decoder", []() {
440-
QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/VTM/releases"));
441-
});
442-
addLambdaActionToMenu(downloadsMenu, "dav1d AV1 decoder", []() {
443-
QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/dav1d/releases"));
444-
});
445-
addLambdaActionToMenu(downloadsMenu, "FFmpeg libraries", []() {
446-
QDesktopServices::openUrl(QUrl("https://ffmpeg.org/"));
447-
});
448-
addLambdaActionToMenu(downloadsMenu, "VVDec libraries", []() {
449-
QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/vvdec/releases"));
450-
});
442+
addLambdaActionToMenu(downloadsMenu,
443+
"libde265 HEVC decoder",
444+
[]() {
445+
QDesktopServices::openUrl(
446+
QUrl("https://github.com/ChristianFeldmann/libde265/releases"));
447+
});
448+
addLambdaActionToMenu(
449+
downloadsMenu,
450+
"HM reference HEVC decoder",
451+
[]()
452+
{ QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/libHM/releases")); });
453+
addLambdaActionToMenu(
454+
downloadsMenu,
455+
"VTM VVC decoder",
456+
[]()
457+
{ QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/VTM/releases")); });
458+
addLambdaActionToMenu(
459+
downloadsMenu,
460+
"dav1d AV1 decoder",
461+
[]()
462+
{ QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/dav1d/releases")); });
463+
addLambdaActionToMenu(downloadsMenu,
464+
"FFmpeg libraries",
465+
[]() { QDesktopServices::openUrl(QUrl("https://ffmpeg.org/")); });
466+
addLambdaActionToMenu(
467+
downloadsMenu,
468+
"VVDec libraries",
469+
[]()
470+
{ QDesktopServices::openUrl(QUrl("https://github.com/ChristianFeldmann/vvdec/releases")); });
451471
helpMenu->addSeparator();
452472
addLambdaActionToMenu(downloadsMenu, "Performance Tests", [this]() { this->performanceTest(); });
453473
addActionToMenu(helpMenu, "Reset Window Layout", this, &MainWindow::resetWindowLayout);

0 commit comments

Comments
 (0)