diff --git a/src/av/AvInfo.cpp b/src/av/AvInfo.cpp
index d433fd43..186d41f6 100644
--- a/src/av/AvInfo.cpp
+++ b/src/av/AvInfo.cpp
@@ -17,12 +17,12 @@
* along with LMS. If not, see .
*/
+#include "AvInfo.hpp"
+
#include
#include "utils/Logger.hpp"
-#include "AvInfo.hpp"
-
namespace Av {
static std::string averror_to_string(int error)
diff --git a/src/av/AvTranscoder.cpp b/src/av/AvTranscoder.cpp
index 35ea8162..479d50f6 100644
--- a/src/av/AvTranscoder.cpp
+++ b/src/av/AvTranscoder.cpp
@@ -16,14 +16,15 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see .
*/
+
+#include "AvTranscoder.hpp"
+
#include
#include
#include "utils/Path.hpp"
#include "utils/Logger.hpp"
-#include "AvTranscoder.hpp"
-
namespace Av {
#define LMS_LOG_TRANSCODE(sev) LMS_LOG(TRANSCODE, INFO) << "[" << _id << "] - "
diff --git a/src/cover/CoverArtGrabber.cpp b/src/cover/CoverArtGrabber.cpp
index 7a09bf72..fee2167f 100644
--- a/src/cover/CoverArtGrabber.cpp
+++ b/src/cover/CoverArtGrabber.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "CoverArtGrabber.hpp"
+
#include
#include "av/AvInfo.hpp"
@@ -26,8 +28,6 @@
#include "utils/Logger.hpp"
-#include "CoverArtGrabber.hpp"
-
namespace {
bool
diff --git a/src/database/DatabaseHandler.cpp b/src/database/DatabaseHandler.cpp
index dc915eb7..f6ed9e6b 100644
--- a/src/database/DatabaseHandler.cpp
+++ b/src/database/DatabaseHandler.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "DatabaseHandler.hpp"
+
#include
#include
@@ -39,8 +41,6 @@
#include "Release.hpp"
#include "Track.hpp"
-#include "DatabaseHandler.hpp"
-
namespace Database {
diff --git a/src/database/DbArtist.cpp b/src/database/DbArtist.cpp
index 416bdc26..b9dfb1ed 100644
--- a/src/database/DbArtist.cpp
+++ b/src/database/DbArtist.cpp
@@ -16,13 +16,12 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see .
*/
-
-#include "SqlQuery.hpp"
+#include "DbArtist.hpp"
#include "utils/Logger.hpp"
#include "Release.hpp"
-#include "DbArtist.hpp"
+#include "SqlQuery.hpp"
#include "Track.hpp"
namespace Database
diff --git a/src/database/MediaDirectory.cpp b/src/database/MediaDirectory.cpp
index edc4d7ef..72dea4e7 100644
--- a/src/database/MediaDirectory.cpp
+++ b/src/database/MediaDirectory.cpp
@@ -17,10 +17,10 @@
* along with LMS. If not, see .
*/
-#include "utils/Utils.hpp"
-
#include "MediaDirectory.hpp"
+#include "utils/Utils.hpp"
+
namespace Database {
MediaDirectory::MediaDirectory(boost::filesystem::path p)
diff --git a/src/database/Playlist.cpp b/src/database/Playlist.cpp
index d1b5842b..0b52b86c 100644
--- a/src/database/Playlist.cpp
+++ b/src/database/Playlist.cpp
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see .
*/
+#include "Playlist.hpp"
+
#include
#include "User.hpp"
#include "Track.hpp"
-#include "Playlist.hpp"
-
namespace Database {
Playlist::Playlist()
diff --git a/src/database/Release.cpp b/src/database/Release.cpp
index cde23718..adc836b0 100644
--- a/src/database/Release.cpp
+++ b/src/database/Release.cpp
@@ -17,13 +17,12 @@
* along with LMS. If not, see .
*/
-#include "SqlQuery.hpp"
+#include "Release.hpp"
#include "DbArtist.hpp"
+#include "SqlQuery.hpp"
#include "Track.hpp"
-#include "Release.hpp"
-
namespace Database
{
diff --git a/src/database/SqlQuery.cpp b/src/database/SqlQuery.cpp
index 611e1c9e..6956d180 100644
--- a/src/database/SqlQuery.cpp
+++ b/src/database/SqlQuery.cpp
@@ -17,15 +17,13 @@
* along with LMS. If not, see .
*/
-#include
+#include "SqlQuery.hpp"
-#include
+#include
#include
#include
-#include "SqlQuery.hpp"
-
WhereClause&
WhereClause::And(const WhereClause& otherClause)
{
@@ -35,7 +33,8 @@ WhereClause::And(const WhereClause& otherClause)
_clause += "(" + otherClause._clause + ")";
// Add associated bind args
- BOOST_FOREACH(const std::string& otherBindArg, otherClause._bindArgs) {
+ for (const std::string& otherBindArg : otherClause._bindArgs)
+ {
_bindArgs.push_back(otherBindArg);
}
}
@@ -51,7 +50,8 @@ WhereClause::Or(const WhereClause& otherClause)
_clause += "(" + otherClause._clause + ")";
// Add associated bind args
- BOOST_FOREACH(const std::string& otherBindArg, otherClause._bindArgs) {
+ for (const std::string& otherBindArg : otherClause._bindArgs)
+ {
_bindArgs.push_back(otherBindArg);
}
}
@@ -147,7 +147,8 @@ FromClause::FromClause(const std::string& clause)
FromClause&
FromClause::And(const FromClause& clause)
{
- BOOST_FOREACH(const std::string fromClause, clause._clause) {
+ for (const std::string fromClause : clause._clause)
+ {
_clause.push_back(fromClause);
}
diff --git a/src/database/Track.cpp b/src/database/Track.cpp
index 9283eef7..54307fb3 100644
--- a/src/database/Track.cpp
+++ b/src/database/Track.cpp
@@ -17,14 +17,13 @@
* along with LMS. If not, see .
*/
-#include "utils/Logger.hpp"
+#include "Track.hpp"
-#include "SqlQuery.hpp"
+#include "utils/Logger.hpp"
#include "DbArtist.hpp"
#include "Release.hpp"
-
-#include "Track.hpp"
+#include "SqlQuery.hpp"
namespace Database {
diff --git a/src/image/Image.cpp b/src/image/Image.cpp
index 03fea576..11c63eda 100644
--- a/src/image/Image.cpp
+++ b/src/image/Image.cpp
@@ -17,10 +17,9 @@
* along with LMS. If not, see .
*/
-#include "utils/Logger.hpp"
-
#include "Image.hpp"
+#include "utils/Logger.hpp"
namespace Image {
diff --git a/src/metadata/AvFormat.cpp b/src/metadata/AvFormat.cpp
index d2ba1788..a4a2943d 100644
--- a/src/metadata/AvFormat.cpp
+++ b/src/metadata/AvFormat.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "AvFormat.hpp"
+
#include
#include "av/AvInfo.hpp"
@@ -24,9 +26,6 @@
#include "utils/Logger.hpp"
#include "utils/Utils.hpp"
-#include "AvFormat.hpp"
-
-
namespace MetaData
{
diff --git a/src/metadata/TagLibParser.cpp b/src/metadata/TagLibParser.cpp
index d479824f..21800b35 100644
--- a/src/metadata/TagLibParser.cpp
+++ b/src/metadata/TagLibParser.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "TagLibParser.hpp"
+
#include
#include
#include
@@ -26,9 +28,6 @@
#include "utils/Logger.hpp"
#include "utils/Utils.hpp"
-#include "TagLibParser.hpp"
-
-
namespace MetaData
{
diff --git a/src/scanner/MediaScanner.cpp b/src/scanner/MediaScanner.cpp
index 6ea38650..7b05e795 100644
--- a/src/scanner/MediaScanner.cpp
+++ b/src/scanner/MediaScanner.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "MediaScanner.hpp"
+
#include
#include
@@ -36,8 +38,6 @@
#include "utils/Path.hpp"
#include "utils/Utils.hpp"
-#include "MediaScanner.hpp"
-
namespace {
const std::string updatePeriodSetting = "update_period";
diff --git a/src/ui/Auth.cpp b/src/ui/Auth.cpp
index ff1d39da..c2837d2c 100644
--- a/src/ui/Auth.cpp
+++ b/src/ui/Auth.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "Auth.hpp"
+
#include
#include
#include
@@ -27,8 +29,6 @@
#include "common/Validators.hpp"
#include "LmsApplication.hpp"
-#include "Auth.hpp"
-
namespace UserInterface {
Auth::Auth()
diff --git a/src/ui/HomeView.cpp b/src/ui/HomeView.cpp
index f5309e70..965d7da9 100644
--- a/src/ui/HomeView.cpp
+++ b/src/ui/HomeView.cpp
@@ -17,14 +17,14 @@
* along with LMS. If not, see .
*/
+#include "HomeView.hpp"
+
#include
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
-#include "HomeView.hpp"
-
namespace UserInterface {
diff --git a/src/ui/LmsApplication.cpp b/src/ui/LmsApplication.cpp
index 702f23b2..d847964b 100644
--- a/src/ui/LmsApplication.cpp
+++ b/src/ui/LmsApplication.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "LmsApplication.hpp"
+
#include
#include
#include
@@ -46,8 +48,6 @@
#include "resource/ImageResource.hpp"
#include "resource/TranscodeResource.hpp"
-#include "LmsApplication.hpp"
-
namespace UserInterface {
std::unique_ptr
diff --git a/src/ui/MediaPlayer.cpp b/src/ui/MediaPlayer.cpp
index 8fb21a14..3c001c01 100644
--- a/src/ui/MediaPlayer.cpp
+++ b/src/ui/MediaPlayer.cpp
@@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see .
*/
+
+#include "MediaPlayer.hpp"
+
#include
#include "av/AvInfo.hpp"
@@ -25,8 +28,6 @@
#include "resource/TranscodeResource.hpp"
#include "LmsApplication.hpp"
-#include "MediaPlayer.hpp"
-
namespace UserInterface {
diff --git a/src/ui/PlayQueueView.cpp b/src/ui/PlayQueueView.cpp
index 321d9f63..bc2f00fe 100644
--- a/src/ui/PlayQueueView.cpp
+++ b/src/ui/PlayQueueView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "PlayQueueView.hpp"
+
#include
#include
#include
@@ -26,7 +28,6 @@
#include "database/Playlist.hpp"
#include "LmsApplication.hpp"
-#include "PlayQueueView.hpp"
namespace UserInterface {
diff --git a/src/ui/SettingsView.cpp b/src/ui/SettingsView.cpp
index 54db2359..89a99107 100644
--- a/src/ui/SettingsView.cpp
+++ b/src/ui/SettingsView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "SettingsView.hpp"
+
#include
#include
#include
@@ -30,8 +32,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
-#include "SettingsView.hpp"
-
namespace UserInterface {
using namespace Database;
diff --git a/src/ui/admin/DatabaseSettingsView.cpp b/src/ui/admin/DatabaseSettingsView.cpp
index 2894050d..98a1e1c7 100644
--- a/src/ui/admin/DatabaseSettingsView.cpp
+++ b/src/ui/admin/DatabaseSettingsView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "DatabaseSettingsView.hpp"
+
#include
#include
#include
@@ -34,8 +36,6 @@
#include "LmsApplication.hpp"
-#include "DatabaseSettingsView.hpp"
-
namespace UserInterface {
using namespace Database;
diff --git a/src/ui/admin/InitWizardView.cpp b/src/ui/admin/InitWizardView.cpp
index 253ce0f1..93f8faaf 100644
--- a/src/ui/admin/InitWizardView.cpp
+++ b/src/ui/admin/InitWizardView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "InitWizardView.hpp"
+
#include
#include
#include
@@ -27,8 +29,6 @@
#include "common/Validators.hpp"
#include "LmsApplication.hpp"
-#include "InitWizardView.hpp"
-
namespace UserInterface {
class InitWizardModel : public Wt::WFormModel
diff --git a/src/ui/admin/UserView.cpp b/src/ui/admin/UserView.cpp
index 62dfe1d1..43839835 100644
--- a/src/ui/admin/UserView.cpp
+++ b/src/ui/admin/UserView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "UserView.hpp"
+
#include
#include
#include
@@ -32,7 +34,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
-#include "UserView.hpp"
namespace UserInterface {
diff --git a/src/ui/admin/UsersView.cpp b/src/ui/admin/UsersView.cpp
index 776d61f0..3a2c7940 100644
--- a/src/ui/admin/UsersView.cpp
+++ b/src/ui/admin/UsersView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "UsersView.hpp"
+
#include
#include
@@ -24,7 +26,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
-#include "UsersView.hpp"
namespace UserInterface {
diff --git a/src/ui/admin/UsersView.hpp b/src/ui/admin/UsersView.hpp
index aba8fbca..e5691146 100644
--- a/src/ui/admin/UsersView.hpp
+++ b/src/ui/admin/UsersView.hpp
@@ -20,6 +20,7 @@
#pragma once
#include
+#include
namespace UserInterface {
diff --git a/src/ui/common/Validators.cpp b/src/ui/common/Validators.cpp
index 72b7258e..19b71b1f 100644
--- a/src/ui/common/Validators.cpp
+++ b/src/ui/common/Validators.cpp
@@ -17,12 +17,12 @@
* along with LMS. If not, see .
*/
+#include "Validators.hpp"
+
#include
#include
-#include "Validators.hpp"
-
namespace UserInterface {
std::shared_ptr
diff --git a/src/ui/explore/ArtistView.cpp b/src/ui/explore/ArtistView.cpp
index f883a7b4..230776df 100644
--- a/src/ui/explore/ArtistView.cpp
+++ b/src/ui/explore/ArtistView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "ArtistView.hpp"
+
#include
#include
#include
@@ -32,7 +34,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
-#include "ArtistView.hpp"
using namespace Database;
diff --git a/src/ui/explore/ArtistsView.cpp b/src/ui/explore/ArtistsView.cpp
index aba01ab5..249d8c93 100644
--- a/src/ui/explore/ArtistsView.cpp
+++ b/src/ui/explore/ArtistsView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "ArtistsView.hpp"
+
#include
#include
#include
@@ -29,7 +31,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
-#include "ArtistsView.hpp"
using namespace Database;
diff --git a/src/ui/explore/Explore.cpp b/src/ui/explore/Explore.cpp
index d9596ace..4d376b86 100644
--- a/src/ui/explore/Explore.cpp
+++ b/src/ui/explore/Explore.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "Explore.hpp"
+
#include
#include
#include
@@ -32,8 +34,6 @@
#include "ReleaseView.hpp"
#include "TracksView.hpp"
-#include "Explore.hpp"
-
namespace UserInterface {
diff --git a/src/ui/explore/Filters.cpp b/src/ui/explore/Filters.cpp
index 6c63eed3..a460c3e9 100644
--- a/src/ui/explore/Filters.cpp
+++ b/src/ui/explore/Filters.cpp
@@ -17,13 +17,13 @@
* along with LMS. If not, see .
*/
+#include "Filters.hpp"
+
#include
#include
#include
#include
-#include "Filters.hpp"
-
#include "LmsApplication.hpp"
namespace UserInterface {
diff --git a/src/ui/explore/ReleaseView.cpp b/src/ui/explore/ReleaseView.cpp
index 9be21dfa..f03ccaf2 100644
--- a/src/ui/explore/ReleaseView.cpp
+++ b/src/ui/explore/ReleaseView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "ReleaseView.hpp"
+
#include
#include
#include
@@ -33,7 +35,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
-#include "ReleaseView.hpp"
using namespace Database;
diff --git a/src/ui/explore/ReleaseView.hpp b/src/ui/explore/ReleaseView.hpp
index c0e628ca..6423ce3c 100644
--- a/src/ui/explore/ReleaseView.hpp
+++ b/src/ui/explore/ReleaseView.hpp
@@ -20,6 +20,7 @@
#pragma once
#include
+#include
#include "database/Types.hpp"
diff --git a/src/ui/explore/ReleasesView.cpp b/src/ui/explore/ReleasesView.cpp
index f634cd29..cef56ac5 100644
--- a/src/ui/explore/ReleasesView.cpp
+++ b/src/ui/explore/ReleasesView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "ReleasesView.hpp"
+
#include
#include
#include
@@ -32,7 +34,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
-#include "ReleasesView.hpp"
namespace UserInterface {
diff --git a/src/ui/explore/TracksView.cpp b/src/ui/explore/TracksView.cpp
index 77962644..53862e1c 100644
--- a/src/ui/explore/TracksView.cpp
+++ b/src/ui/explore/TracksView.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "TracksView.hpp"
+
#include
#include
#include
@@ -33,7 +35,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
-#include "TracksView.hpp"
namespace UserInterface {
diff --git a/src/ui/resource/ImageResource.cpp b/src/ui/resource/ImageResource.cpp
index af342972..58ba6b0a 100644
--- a/src/ui/resource/ImageResource.cpp
+++ b/src/ui/resource/ImageResource.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "ImageResource.hpp"
+
#include
#include
@@ -27,8 +29,6 @@
#include "cover/CoverArtGrabber.hpp"
-#include "ImageResource.hpp"
-
namespace UserInterface {
static const std::string unknownCoverPath = "/images/unknown-cover.jpg";
diff --git a/src/ui/resource/TranscodeResource.cpp b/src/ui/resource/TranscodeResource.cpp
index f6aa03f9..7b70991f 100644
--- a/src/ui/resource/TranscodeResource.cpp
+++ b/src/ui/resource/TranscodeResource.cpp
@@ -17,14 +17,14 @@
* along with LMS. If not, see .
*/
+#include "TranscodeResource.hpp"
+
#include
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
-#include "TranscodeResource.hpp"
-
namespace UserInterface {
TranscodeResource::TranscodeResource(Database::Handler& db)
diff --git a/src/utils/Config.cpp b/src/utils/Config.cpp
index abc20d89..3c39b89f 100644
--- a/src/utils/Config.cpp
+++ b/src/utils/Config.cpp
@@ -17,10 +17,10 @@
* along with LMS. If not, see .
*/
-#include
-
#include "Config.hpp"
+#include
+
namespace {
}
diff --git a/src/utils/Path.cpp b/src/utils/Path.cpp
index 2f937ce2..b6511840 100644
--- a/src/utils/Path.cpp
+++ b/src/utils/Path.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "Path.hpp"
+
#include
#include
#include
@@ -26,8 +28,6 @@
#include "utils/Logger.hpp"
-#include "Path.hpp"
-
boost::filesystem::path searchExecPath(std::string filename)
{
std::string path;
diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp
index d1013209..f7864cb1 100644
--- a/src/utils/Utils.cpp
+++ b/src/utils/Utils.cpp
@@ -17,6 +17,8 @@
* along with LMS. If not, see .
*/
+#include "Utils.hpp"
+
#include
#include
#include
@@ -26,8 +28,6 @@
#include
#include
-#include "Utils.hpp"
-
bool readList(const std::string& str, const std::string& separators, std::list& results)
{
std::string curStr;