build: get rid of some compiler warnings

<description>
This commit is contained in:
Andreas Stallinger
2017-04-10 15:51:26 +02:00
parent 85f4262787
commit 17c0189a83
5 changed files with 9 additions and 11 deletions
+3 -3
View File
@@ -766,7 +766,7 @@ bool SqliteStorage::checkNodeExistsByName(const std::string& serializedName) con
{
const Id id = q.getIntField(0, 0);
if (id != -1)
if (id != (Id)-1)
{
return true;
}
@@ -1003,7 +1003,7 @@ void SqliteStorage::editNodeBookmark(const NodeBookmark& bookmark)
std::string statement = "UPDATE nodeBookmark SET name=?, comment=?, category=? WHERE id=" + std::to_string(bookmark.getId()) + ";";
BookmarkCategory category = getBookmarkCategoryByName(bookmark.getCategory().getName());
if (category.getId() == -1)
if (category.getId() == (Id)-1)
{
category.setId(addBookmarkCategory(bookmark.getCategory().getName()));
category.setName(bookmark.getCategory().getName());
@@ -1095,7 +1095,7 @@ void SqliteStorage::editEdgeBookmark(const EdgeBookmark& bookmark)
std::string statement = "UPDATE edgeBookmark SET name=?, comment=?, category=? WHERE id=" + std::to_string(bookmark.getId()) + ";";
BookmarkCategory category = getBookmarkCategoryByName(bookmark.getCategory().getName());
if (category.getId() == -1)
if (category.getId() == (Id)-1)
{
category.setId(addBookmarkCategory(bookmark.getCategory().getName()));
category.setName(bookmark.getCategory().getName());
+1 -1
View File
@@ -9,7 +9,7 @@ void IndexerCommandList::addCommand(std::shared_ptr<IndexerCommand> command)
m_commands.push_back(command);
}
int IndexerCommandList::size() const
size_t IndexerCommandList::size() const
{
return m_commands.size();
}
+1 -1
View File
@@ -12,7 +12,7 @@ class IndexerCommandList
public:
void addCommand(std::shared_ptr<IndexerCommand> command);
int size() const;
size_t size() const;
void shuffle();
+2 -2
View File
@@ -3,9 +3,9 @@
#include "utility/utility.h"
SourceGroupSettings::SourceGroupSettings(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings)
: m_id(id)
: m_projectSettings(projectSettings)
, m_id(id)
, m_type(type)
, m_projectSettings(projectSettings)
{
}
@@ -89,7 +89,6 @@ void QtProjectWizzard::newProject()
void QtProjectWizzard::newProjectFromSolution(const std::string& ideId, const FilePath& solutionPath)
{
int i = 0;
}
void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath, const std::vector<FilePath>& headerPaths)
@@ -108,7 +107,6 @@ void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath, const std::ve
void QtProjectWizzard::refreshProjectFromSolution(const std::string& ideId, const std::string& solutionPath)
{
int i = 0;
}
void QtProjectWizzard::editProject(const FilePath& settingsPath)
@@ -330,7 +328,7 @@ void QtProjectWizzard::emptyProject()
void QtProjectWizzard::emptyProjectCDBVS()
{
QtProjectWizzardWindow* window = window = createWindowWithContent(
QtProjectWizzardWindow* window = createWindowWithContent(
[this](QtProjectWizzardWindow* window)
{
return new QtProjectWizzardContentDataCDBVS(m_projectSettings, m_sourceGroupSettings, window);
@@ -354,7 +352,7 @@ void QtProjectWizzard::emptyProjectCDB()
void QtProjectWizzard::emptyProjectJavaMaven()
{
QtProjectWizzardWindow* window = window = createWindowWithContent(
QtProjectWizzardWindow* window = createWindowWithContent(
[this](QtProjectWizzardWindow* window)
{
return new QtProjectWizzardContentData(m_projectSettings, m_sourceGroupSettings, window);