Uppercase literal suffix
This commit is contained in:
parent
a83f174e1a
commit
3a3305c020
|
@ -461,7 +461,7 @@ void SingleApplicationPrivate::slotClientConnectionClosed(QLocalSocket *closedSo
|
|||
void SingleApplicationPrivate::randomSleep() {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
QThread::msleep(QRandomGenerator::global()->bounded(8u, 18u));
|
||||
QThread::msleep(QRandomGenerator::global()->bounded(8U, 18U));
|
||||
#else
|
||||
qsrand(QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max());
|
||||
QThread::msleep(8 + static_cast<unsigned long>(static_cast<float>(qrand()) / RAND_MAX * 10));
|
||||
|
|
|
@ -461,7 +461,7 @@ void SingleCoreApplicationPrivate::slotClientConnectionClosed(QLocalSocket *clos
|
|||
void SingleCoreApplicationPrivate::randomSleep() {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
QThread::msleep(QRandomGenerator::global()->bounded(8u, 18u));
|
||||
QThread::msleep(QRandomGenerator::global()->bounded(8U, 18U));
|
||||
#else
|
||||
qsrand(QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max());
|
||||
QThread::msleep(8 + static_cast<unsigned long>(static_cast<float>(qrand()) / RAND_MAX * 10));
|
||||
|
|
|
@ -52,7 +52,7 @@ const int Rainbow::RainbowAnalyzer::kSleepingHeight[] = {24, 33};
|
|||
|
||||
const char *Rainbow::NyanCatAnalyzer::kName = "Nyanalyzer Cat";
|
||||
const char *Rainbow::RainbowDashAnalyzer::kName = "Rainbow Dash";
|
||||
const float Rainbow::RainbowAnalyzer::kPixelScale = 0.02f;
|
||||
const float Rainbow::RainbowAnalyzer::kPixelScale = 0.02F;
|
||||
|
||||
Rainbow::RainbowAnalyzer::RainbowType Rainbow::RainbowAnalyzer::rainbowtype;
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ void Player::SeekTo(const qint64 seconds) {
|
|||
return;
|
||||
}
|
||||
|
||||
const qint64 nanosec = qBound(0ll, seconds * kNsecPerSec, length_nanosec);
|
||||
const qint64 nanosec = qBound(0LL, seconds * kNsecPerSec, length_nanosec);
|
||||
engine_->Seek(nanosec);
|
||||
|
||||
qLog(Debug) << "Track seeked to" << nanosec << "ns - updating scrobble point";
|
||||
|
|
|
@ -444,7 +444,7 @@ void Song::set_grouping(const QString &v) { d->grouping_ = v; }
|
|||
void Song::set_comment(const QString &v) { d->comment_ = v; }
|
||||
void Song::set_lyrics(const QString &v) { d->lyrics_ = v; }
|
||||
|
||||
void Song::set_beginning_nanosec(qint64 v) { d->beginning_ = qMax(0ll, v); }
|
||||
void Song::set_beginning_nanosec(qint64 v) { d->beginning_ = qMax(0LL, v); }
|
||||
void Song::set_end_nanosec(qint64 v) { d->end_ = v; }
|
||||
void Song::set_length_nanosec(qint64 v) { d->end_ = d->beginning_ + v; }
|
||||
|
||||
|
@ -1511,7 +1511,7 @@ QString Song::PrettyRating() const {
|
|||
|
||||
double rating = d->rating_;
|
||||
|
||||
if (rating == -1.0f) return "0";
|
||||
if (rating == -1.0F) return "0";
|
||||
|
||||
return QString::number(static_cast<int>(rating * 100));
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ QColor StyleHelper::borderColor(bool lightColored) {
|
|||
QColor StyleHelper::toolBarBorderColor() {
|
||||
|
||||
const QColor base = baseColor();
|
||||
return QColor::fromHsv(base.hue(), base.saturation(), clamp(base.value() * 0.80f));
|
||||
return QColor::fromHsv(base.hue(), base.saturation(), clamp(base.value() * 0.80F));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -348,7 +348,7 @@ qint64 GstEngine::position_nanosec() const {
|
|||
if (!current_pipeline_) return 0;
|
||||
|
||||
const qint64 result = current_pipeline_->position() - beginning_nanosec_;
|
||||
return qint64(qMax(0ll, result));
|
||||
return qint64(qMax(0LL, result));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ GstEnginePipeline::GstEnginePipeline(GstEngine *engine, QObject *parent)
|
|||
stereo_balancer_enabled_(false),
|
||||
eq_enabled_(false),
|
||||
rg_enabled_(false),
|
||||
stereo_balance_(0.0f),
|
||||
stereo_balance_(0.0F),
|
||||
eq_preamp_(0),
|
||||
rg_mode_(0),
|
||||
rg_preamp_(0.0),
|
||||
|
@ -101,7 +101,7 @@ GstEnginePipeline::GstEnginePipeline(GstEngine *engine, QObject *parent)
|
|||
last_known_position_ns_(0),
|
||||
next_uri_set_(false),
|
||||
volume_percent_(100),
|
||||
volume_modifier_(1.0f),
|
||||
volume_modifier_(1.0F),
|
||||
use_fudge_timer_(false),
|
||||
pipeline_(nullptr),
|
||||
audiobin_(nullptr),
|
||||
|
@ -171,7 +171,7 @@ void GstEnginePipeline::set_volume_enabled(const bool enabled) {
|
|||
|
||||
void GstEnginePipeline::set_stereo_balancer_enabled(const bool enabled) {
|
||||
stereo_balancer_enabled_ = enabled;
|
||||
if (!enabled) stereo_balance_ = 0.0f;
|
||||
if (!enabled) stereo_balance_ = 0.0F;
|
||||
if (pipeline_) UpdateStereoBalance();
|
||||
}
|
||||
|
||||
|
@ -350,12 +350,12 @@ bool GstEnginePipeline::InitAudioBin() {
|
|||
|
||||
// Dummy first band (bandwidth 0, cutting below 20Hz):
|
||||
GstObject *first_band = GST_OBJECT(gst_child_proxy_get_child_by_index(GST_CHILD_PROXY(equalizer_), 0));
|
||||
g_object_set(G_OBJECT(first_band), "freq", 20.0, "bandwidth", 0, "gain", 0.0f, nullptr);
|
||||
g_object_set(G_OBJECT(first_band), "freq", 20.0, "bandwidth", 0, "gain", 0.0F, nullptr);
|
||||
g_object_unref(G_OBJECT(first_band));
|
||||
|
||||
// Dummy last band (bandwidth 0, cutting over 20KHz):
|
||||
GstObject *last_band = GST_OBJECT(gst_child_proxy_get_child_by_index(GST_CHILD_PROXY(equalizer_), kEqBandCount + 1));
|
||||
g_object_set(G_OBJECT(last_band), "freq", 20000.0, "bandwidth", 0, "gain", 0.0f, nullptr);
|
||||
g_object_set(G_OBJECT(last_band), "freq", 20000.0, "bandwidth", 0, "gain", 0.0F, nullptr);
|
||||
g_object_unref(G_OBJECT(last_band));
|
||||
|
||||
int last_band_frequency = 0;
|
||||
|
@ -367,7 +367,7 @@ bool GstEnginePipeline::InitAudioBin() {
|
|||
const float bandwidth = frequency - static_cast<float>(last_band_frequency);
|
||||
last_band_frequency = static_cast<int>(frequency);
|
||||
|
||||
g_object_set(G_OBJECT(band), "freq", frequency, "bandwidth", bandwidth, "gain", 0.0f, nullptr);
|
||||
g_object_set(G_OBJECT(band), "freq", frequency, "bandwidth", bandwidth, "gain", 0.0F, nullptr);
|
||||
g_object_unref(G_OBJECT(band));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ void VLCEngine::SetVolumeSW(const uint percent) {
|
|||
qint64 VLCEngine::position_nanosec() const {
|
||||
if (state_ == Engine::Empty) return 0;
|
||||
const qint64 result = (position() * kNsecPerMsec);
|
||||
return qint64(qMax(0ll, result));
|
||||
return qint64(qMax(0LL, result));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ Equalizer::Params Equalizer::current_params() const {
|
|||
}
|
||||
|
||||
float Equalizer::stereo_balance() const {
|
||||
return qBound(-1.0f, static_cast<float>(ui_->stereo_balance_slider->value()) / 100.0f, 1.0f);
|
||||
return qBound(-1.0F, static_cast<float>(ui_->stereo_balance_slider->value()) / 100.0F, 1.0F);
|
||||
}
|
||||
|
||||
void Equalizer::StereoBalancerEnabledChangedSlot(const bool enabled) {
|
||||
|
|
|
@ -142,11 +142,11 @@ void MoodbarRenderer::Render(const ColorVector &colors, QPainter *p, const QRect
|
|||
|
||||
for (int y = 0; y <= rect.height() / 2; ++y) {
|
||||
float coeff = float(y) / float(rect.height() / 2); // NOLINT(bugprone-integer-division)
|
||||
float coeff2 = 1.0f - ((1.0f - coeff) * (1.0f - coeff));
|
||||
coeff = 1.0f - (1.0f - coeff) / 2.0f;
|
||||
coeff2 = 1.f - (1.f - coeff2) / 2.0f;
|
||||
float coeff2 = 1.0F - ((1.0F - coeff) * (1.0F - coeff));
|
||||
coeff = 1.0F - (1.0F - coeff) / 2.0F;
|
||||
coeff2 = 1.F - (1.F - coeff2) / 2.0F;
|
||||
|
||||
p->setPen(QColor::fromHsv(h, qBound(0, int(float(s) * coeff), 255), qBound(0, int(255.f - (255.f - float(v)) * coeff2), 255)));
|
||||
p->setPen(QColor::fromHsv(h, qBound(0, int(float(s) * coeff), 255), qBound(0, int(255.F - (255.F - float(v)) * coeff2), 255)));
|
||||
|
||||
p->drawPoint(rect.left() + x, rect.top() + y);
|
||||
p->drawPoint(rect.left() + x, rect.top() + rect.height() - 1 - y);
|
||||
|
|
|
@ -113,8 +113,8 @@ const char *Playlist::kWriteMetadata = "write_metadata";
|
|||
const int Playlist::kUndoStackSize = 20;
|
||||
const int Playlist::kUndoItemLimit = 500;
|
||||
|
||||
const qint64 Playlist::kMinScrobblePointNsecs = 31ll * kNsecPerSec;
|
||||
const qint64 Playlist::kMaxScrobblePointNsecs = 240ll * kNsecPerSec;
|
||||
const qint64 Playlist::kMinScrobblePointNsecs = 31LL * kNsecPerSec;
|
||||
const qint64 Playlist::kMaxScrobblePointNsecs = 240LL * kNsecPerSec;
|
||||
|
||||
Playlist::Playlist(PlaylistBackend *backend, TaskManager *task_manager, CollectionBackend *collection, const int id, const QString &special_type, const bool favorite, QObject *parent)
|
||||
: QAbstractListModel(parent),
|
||||
|
|
Loading…
Reference in New Issue