]> git.sesse.net Git - pkanalytics/commitdiff
Minor STL quibbles.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 May 2023 10:32:33 +0000 (12:32 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 May 2023 10:32:33 +0000 (12:32 +0200)
stats.cpp

index b0ba4b3881ee5230206f9508ce23aeb04d4eaba5..5124ca320c629ab5eb9189deaca323db37b54705 100644 (file)
--- a/stats.cpp
+++ b/stats.cpp
@@ -4,6 +4,7 @@
 #include <QGridLayout>
 #include <QVideoWidget>
 #include <QShortcut>
+#include <algorithm>
 #include <string>
 #include <map>
 #include <vector>
@@ -14,7 +15,7 @@
 
 using namespace std;
 
-std::string format_timestamp(uint64_t pos)
+string format_timestamp(uint64_t pos)
 {
        int ms = pos % 1000;
        pos /= 1000;
@@ -229,7 +230,7 @@ void MainWindow::setModel(QAbstractItemModel *model)
 void MainWindow::seek(int64_t delta_ms)
 {
        int64_t current_pos = buffered_seek ? *buffered_seek : player->position();
-       uint64_t pos = std::max<int64_t>(current_pos + delta_ms, 0);
+       uint64_t pos = max<int64_t>(current_pos + delta_ms, 0);
        buffered_seek = pos;
        if (!playing) {
                player->setPlaybackRate(0.01);