Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/engine/sidechain/enginenetworkstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ qint64 EngineNetworkStream::getNetworkTimeUs() {
// will overflow > 200,000 years
#ifdef __WINDOWS__
FILETIME ft;
qint64 t;
// no GetSystemTimePreciseAsFileTime available, fall
// back to GetSystemTimeAsFileTime. This happens before
// Windows 8 and Windows Server 2012
Expand All @@ -156,11 +155,9 @@ qint64 EngineNetworkStream::getNetworkTimeUs() {
// timer was not incremented since last call (< 15 ms)
// Add time since last function call after last increment
// This reduces the jitter < one call cycle which is sufficient
LARGE_INTEGER li;
now += timerSinceInc.elapsed().toIntegerMicros();
} else {
// timer was incremented
LARGE_INTEGER li;
timerSinceInc.start();
oldNow = now;
}
Expand Down
4 changes: 2 additions & 2 deletions src/library/searchquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool AndNode::match(const TrackPointer& pTrack) const {

QString AndNode::toSql() const {
QStringList queryFragments;
queryFragments.reserve(m_nodes.size());
queryFragments.reserve(static_cast<int>(m_nodes.size()));
for (const auto& pNode: m_nodes) {
QString sql = pNode->toSql();
if (!sql.isEmpty()) {
Expand Down Expand Up @@ -118,7 +118,7 @@ bool OrNode::match(const TrackPointer& pTrack) const {

QString OrNode::toSql() const {
QStringList queryFragments;
queryFragments.reserve(m_nodes.size());
queryFragments.reserve(static_cast<int>(m_nodes.size()));
for (const auto& pNode: m_nodes) {
QString sql = pNode->toSql();
if (!sql.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/musicbrainz/chromaprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ QString calcFingerprint(

PerformanceTimer timerGeneratingFingerprint;
timerGeneratingFingerprint.start();
int success = chromaprint_feed(ctx, &fingerprintSamples[0], fingerprintSamples.size());
int success = chromaprint_feed(ctx, &fingerprintSamples[0], static_cast<int>(fingerprintSamples.size()));
chromaprint_finish(ctx);
if (!success) {
qWarning() << "Failed to generate fingerprint from sample data";
Expand Down
2 changes: 1 addition & 1 deletion src/preferences/dialog/dlgprefsound.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class DlgPrefSound : public DlgPreferencePage, public Ui::DlgPrefSoundDlg {
bool m_settingsModified;
bool m_bLatencyChanged;
bool m_bSkipConfigClear;
SoundManagerConfig m_config;
bool m_loading;
SoundManagerConfig m_config;
};

#endif
6 changes: 2 additions & 4 deletions src/soundio/soundmanagerutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,8 @@ unsigned char AudioPath::minChannelsForType(AudioPathType type) {

// static
unsigned char AudioPath::maxChannelsForType(AudioPathType type) {
switch (type) {
default:
return 2;
}
Q_UNUSED(type);
return 2;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions src/util/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
#define M_FALLTHROUGH_INTENDED [[clang::fallthrough]]
#endif
#elif defined(__GNUC__)
// Taken from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough_003d
// We could also use a comment, but that would require ccache users to set the
// keep_comments_cpp option. If we switch to C++17, we can use [[fallthough]].
#define M_FALLTHROUGH_INTENDED __attribute__ ((fallthrough));
#endif

#ifndef M_FALLTHROUGH_INTENDED
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/waveform.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Waveform {

// We do not lock the mutex since m_data is not resized after the
// constructor runs.
inline int getTextureSize() const { return m_data.size(); }
inline int getTextureSize() const { return static_cast<int>(m_data.size()); }

// Atomically get the number of data elements in this Waveform. We do not
// lock the mutex since m_dataSize is not changed after the constructor
Expand Down