Include self header first to catch problems

This commit is contained in:
emeric
2018-05-16 13:58:29 +02:00
parent 9a44fb838d
commit 1e7bfd14c2
39 changed files with 84 additions and 77 deletions
+2 -2
View File
@@ -17,12 +17,12 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AvInfo.hpp"
#include <array>
#include "utils/Logger.hpp"
#include "AvInfo.hpp"
namespace Av {
static std::string averror_to_string(int error)
+3 -2
View File
@@ -16,14 +16,15 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AvTranscoder.hpp"
#include <atomic>
#include <mutex>
#include "utils/Path.hpp"
#include "utils/Logger.hpp"
#include "AvTranscoder.hpp"
namespace Av {
#define LMS_LOG_TRANSCODE(sev) LMS_LOG(TRANSCODE, INFO) << "[" << _id << "] - "
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CoverArtGrabber.hpp"
#include <boost/filesystem.hpp>
#include "av/AvInfo.hpp"
@@ -26,8 +28,6 @@
#include "utils/Logger.hpp"
#include "CoverArtGrabber.hpp"
namespace {
bool
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DatabaseHandler.hpp"
#include <Wt/Dbo/FixedSqlConnectionPool.h>
#include <Wt/Dbo/backend/Sqlite3.h>
@@ -39,8 +41,6 @@
#include "Release.hpp"
#include "Track.hpp"
#include "DatabaseHandler.hpp"
namespace Database {
+2 -3
View File
@@ -16,13 +16,12 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "SqlQuery.hpp"
#include "DbArtist.hpp"
#include "utils/Logger.hpp"
#include "Release.hpp"
#include "DbArtist.hpp"
#include "SqlQuery.hpp"
#include "Track.hpp"
namespace Database
+2 -2
View File
@@ -17,10 +17,10 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/Utils.hpp"
#include "MediaDirectory.hpp"
#include "utils/Utils.hpp"
namespace Database {
MediaDirectory::MediaDirectory(boost::filesystem::path p)
+2 -2
View File
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Playlist.hpp"
#include <cassert>
#include "User.hpp"
#include "Track.hpp"
#include "Playlist.hpp"
namespace Database {
Playlist::Playlist()
+2 -3
View File
@@ -17,13 +17,12 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "SqlQuery.hpp"
#include "Release.hpp"
#include "DbArtist.hpp"
#include "SqlQuery.hpp"
#include "Track.hpp"
#include "Release.hpp"
namespace Database
{
+8 -7
View File
@@ -17,15 +17,13 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <algorithm>
#include "SqlQuery.hpp"
#include <boost/foreach.hpp>
#include <algorithm>
#include <sstream>
#include <stdexcept>
#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);
}
+3 -4
View File
@@ -17,14 +17,13 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#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 {
+1 -2
View File
@@ -17,10 +17,9 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/Logger.hpp"
#include "Image.hpp"
#include "utils/Logger.hpp"
namespace Image {
+2 -3
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AvFormat.hpp"
#include <boost/algorithm/string.hpp>
#include "av/AvInfo.hpp"
@@ -24,9 +26,6 @@
#include "utils/Logger.hpp"
#include "utils/Utils.hpp"
#include "AvFormat.hpp"
namespace MetaData
{
+2 -3
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "TagLibParser.hpp"
#include <taglib/fileref.h>
#include <taglib/tag.h>
#include <taglib/tpropertymap.h>
@@ -26,9 +28,6 @@
#include "utils/Logger.hpp"
#include "utils/Utils.hpp"
#include "TagLibParser.hpp"
namespace MetaData
{
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "MediaScanner.hpp"
#include <stdexcept>
#include <boost/filesystem.hpp>
@@ -36,8 +38,6 @@
#include "utils/Path.hpp"
#include "utils/Utils.hpp"
#include "MediaScanner.hpp"
namespace {
const std::string updatePeriodSetting = "update_period";
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Auth.hpp"
#include <Wt/WFormModel.h>
#include <Wt/WLineEdit.h>
#include <Wt/WCheckBox.h>
@@ -27,8 +29,6 @@
#include "common/Validators.hpp"
#include "LmsApplication.hpp"
#include "Auth.hpp"
namespace UserInterface {
Auth::Auth()
+2 -2
View File
@@ -17,14 +17,14 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "HomeView.hpp"
#include <Wt/WTemplate.h>
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
#include "HomeView.hpp"
namespace UserInterface {
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "LmsApplication.hpp"
#include <Wt/WAnchor.h>
#include <Wt/WBootstrapTheme.h>
#include <Wt/WEnvironment.h>
@@ -46,8 +48,6 @@
#include "resource/ImageResource.hpp"
#include "resource/TranscodeResource.hpp"
#include "LmsApplication.hpp"
namespace UserInterface {
std::unique_ptr<Wt::WApplication>
+3 -2
View File
@@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "MediaPlayer.hpp"
#include <boost/algorithm/string/replace.hpp>
#include "av/AvInfo.hpp"
@@ -25,8 +28,6 @@
#include "resource/TranscodeResource.hpp"
#include "LmsApplication.hpp"
#include "MediaPlayer.hpp"
namespace UserInterface {
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "PlayQueueView.hpp"
#include <Wt/WAnchor.h>
#include <Wt/WImage.h>
#include <Wt/WText.h>
@@ -26,7 +28,6 @@
#include "database/Playlist.hpp"
#include "LmsApplication.hpp"
#include "PlayQueueView.hpp"
namespace UserInterface {
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "SettingsView.hpp"
#include <Wt/WString.h>
#include <Wt/WPushButton.h>
#include <Wt/WComboBox.h>
@@ -30,8 +32,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
#include "SettingsView.hpp"
namespace UserInterface {
using namespace Database;
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DatabaseSettingsView.hpp"
#include <Wt/WString.h>
#include <Wt/WPushButton.h>
#include <Wt/WComboBox.h>
@@ -34,8 +36,6 @@
#include "LmsApplication.hpp"
#include "DatabaseSettingsView.hpp"
namespace UserInterface {
using namespace Database;
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "InitWizardView.hpp"
#include <Wt/WFormModel.h>
#include <Wt/WLineEdit.h>
#include <Wt/WPushButton.h>
@@ -27,8 +29,6 @@
#include "common/Validators.hpp"
#include "LmsApplication.hpp"
#include "InitWizardView.hpp"
namespace UserInterface {
class InitWizardModel : public Wt::WFormModel
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UserView.hpp"
#include <Wt/WApplication.h>
#include <Wt/WCheckBox.h>
#include <Wt/WComboBox.h>
@@ -32,7 +34,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
#include "UserView.hpp"
namespace UserInterface {
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UsersView.hpp"
#include <Wt/WTemplate.h>
#include <Wt/WPushButton.h>
@@ -24,7 +26,6 @@
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
#include "UsersView.hpp"
namespace UserInterface {
+1
View File
@@ -20,6 +20,7 @@
#pragma once
#include <Wt/WContainerWidget.h>
#include <Wt/WTemplate.h>
namespace UserInterface {
+2 -2
View File
@@ -17,12 +17,12 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Validators.hpp"
#include <boost/filesystem.hpp>
#include <Wt/WLengthValidator.h>
#include "Validators.hpp"
namespace UserInterface {
std::shared_ptr<Wt::WValidator>
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ArtistView.hpp"
#include <Wt/WAnchor.h>
#include <Wt/WImage.h>
#include <Wt/WTemplate.h>
@@ -32,7 +34,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
#include "ArtistView.hpp"
using namespace Database;
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ArtistsView.hpp"
#include <Wt/WAnchor.h>
#include <Wt/WTemplate.h>
#include <Wt/WLineEdit.h>
@@ -29,7 +31,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
#include "ArtistsView.hpp"
using namespace Database;
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Explore.hpp"
#include <Wt/WStackedWidget.h>
#include <Wt/WTemplate.h>
#include <Wt/WText.h>
@@ -32,8 +34,6 @@
#include "ReleaseView.hpp"
#include "TracksView.hpp"
#include "Explore.hpp"
namespace UserInterface {
+2 -2
View File
@@ -17,13 +17,13 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Filters.hpp"
#include <Wt/WComboBox.h>
#include <Wt/WDialog.h>
#include <Wt/WPushButton.h>
#include <Wt/WTemplate.h>
#include "Filters.hpp"
#include "LmsApplication.hpp"
namespace UserInterface {
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ReleaseView.hpp"
#include <Wt/WApplication.h>
#include <Wt/WAnchor.h>
#include <Wt/WImage.h>
@@ -33,7 +35,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
#include "ReleaseView.hpp"
using namespace Database;
+1
View File
@@ -20,6 +20,7 @@
#pragma once
#include <Wt/WSignal.h>
#include <Wt/WContainerWidget.h>
#include "database/Types.hpp"
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ReleasesView.hpp"
#include <Wt/WApplication.h>
#include <Wt/WAnchor.h>
#include <Wt/WImage.h>
@@ -32,7 +34,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
#include "ReleasesView.hpp"
namespace UserInterface {
+2 -1
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "TracksView.hpp"
#include <Wt/WAnchor.h>
#include <Wt/WImage.h>
#include <Wt/WLineEdit.h>
@@ -33,7 +35,6 @@
#include "LmsApplication.hpp"
#include "Filters.hpp"
#include "TracksView.hpp"
namespace UserInterface {
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ImageResource.hpp"
#include <Wt/WApplication.h>
#include <Wt/Http/Response.h>
@@ -27,8 +29,6 @@
#include "cover/CoverArtGrabber.hpp"
#include "ImageResource.hpp"
namespace UserInterface {
static const std::string unknownCoverPath = "/images/unknown-cover.jpg";
+2 -2
View File
@@ -17,14 +17,14 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "TranscodeResource.hpp"
#include <Wt/Http/Response.h>
#include "utils/Logger.hpp"
#include "LmsApplication.hpp"
#include "TranscodeResource.hpp"
namespace UserInterface {
TranscodeResource::TranscodeResource(Database::Handler& db)
+2 -2
View File
@@ -17,10 +17,10 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sstream>
#include "Config.hpp"
#include <sstream>
namespace {
}
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Path.hpp"
#include <array>
#include <fstream>
#include <stdexcept>
@@ -26,8 +28,6 @@
#include "utils/Logger.hpp"
#include "Path.hpp"
boost::filesystem::path searchExecPath(std::string filename)
{
std::string path;
+2 -2
View File
@@ -17,6 +17,8 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Utils.hpp"
#include <string>
#include <sstream>
#include <iomanip>
@@ -26,8 +28,6 @@
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string.hpp>
#include "Utils.hpp"
bool readList(const std::string& str, const std::string& separators, std::list<std::string>& results)
{
std::string curStr;