src: fixed clang warnings
This commit is contained in:
@@ -367,7 +367,7 @@ bool QtGraphPostprocessor::getHeatmapGradient(Vec2f& outGradient, const MatrixDy
|
||||
return overlap;
|
||||
}
|
||||
|
||||
Vec2f QtGraphPostprocessor::heatMapRayCast(const MatrixDynamicBase<unsigned int>& heatMap, const Vec2f& startPosition, const Vec2f& direction, const int minValue)
|
||||
Vec2f QtGraphPostprocessor::heatMapRayCast(const MatrixDynamicBase<unsigned int>& heatMap, const Vec2f& startPosition, const Vec2f& direction, unsigned int minValue)
|
||||
{
|
||||
float xOffset = 0.0f;
|
||||
float yOffset = 0.0f;
|
||||
|
||||
@@ -25,7 +25,7 @@ private:
|
||||
static void resolveOverlap(std::list<std::shared_ptr<QtGraphNode>>& nodes, MatrixDynamicBase<unsigned int>& heatMap, const int divisor);
|
||||
static void modifyHeatmapArea(MatrixDynamicBase<unsigned int>& heatMap, const Vec2i& leftUpperCorner, const Vec2i& size, const int modifier);
|
||||
static bool getHeatmapGradient(Vec2f& outGradient, const MatrixDynamicBase<unsigned int>& heatMap, const Vec2i& leftUpperCorner, const Vec2i& size);
|
||||
static Vec2f heatMapRayCast(const MatrixDynamicBase<unsigned int>& heatMap, const Vec2f& startPosition, const Vec2f& direction, const int minValue);
|
||||
static Vec2f heatMapRayCast(const MatrixDynamicBase<unsigned int>& heatMap, const Vec2f& startPosition, const Vec2f& direction, unsigned int minValue);
|
||||
static Vec2i calculateRasterNodeSize(const std::shared_ptr<QtGraphNode>& node);
|
||||
};
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ size_t NameHierarchy::size() const
|
||||
std::string NameHierarchy::getFullName() const
|
||||
{
|
||||
std::string name;
|
||||
for (int i = 0; i < m_elements.size(); i++)
|
||||
for (size_t i = 0; i < m_elements.size(); i++)
|
||||
{
|
||||
name += m_elements[i]->getFullName();
|
||||
if (i < m_elements.size() - 1)
|
||||
if (i + 1 < m_elements.size())
|
||||
{
|
||||
name += "::";
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ std::string CxxDeclNameResolver::getDeclName()
|
||||
{
|
||||
const clang::NamedDecl* declaration = clang::dyn_cast<clang::NamedDecl>(m_declaration);
|
||||
std::string declName = declaration->getNameAsString();
|
||||
clang::Decl::Kind kind = declaration->getKind();
|
||||
if (clang::isa<clang::CXXRecordDecl>(declaration))
|
||||
{
|
||||
clang::ClassTemplateDecl* templateClassDeclaration = clang::dyn_cast<clang::CXXRecordDecl>(declaration)->getDescribedClassTemplate();
|
||||
|
||||
@@ -17,7 +17,7 @@ void CxxNameResolver::ignoreContextDecl(const clang::Decl* decl)
|
||||
bool CxxNameResolver::ignoresContext(const clang::DeclContext* declContext)
|
||||
{
|
||||
const clang::Decl* decl = clang::dyn_cast<clang::Decl>(declContext);
|
||||
for (int i = 0; i < m_ignoredContextDecls.size(); i++)
|
||||
for (size_t i = 0; i < m_ignoredContextDecls.size(); i++)
|
||||
{
|
||||
if (decl == m_ignoredContextDecls[i])
|
||||
{
|
||||
|
||||
@@ -50,9 +50,6 @@ std::string CxxTemplateArgumentNameResolver::getTemplateArgumentName(const clang
|
||||
case clang::TemplateArgument::Pack:
|
||||
LOG_ERROR("Type of template argument not handled: Pack");
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Type of template argument not handled." + argument.getKind());
|
||||
break;
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ std::shared_ptr<DataType> CxxTypeNameResolver::typeToDataType(const clang::Type*
|
||||
}
|
||||
case clang::Type::MemberPointer:
|
||||
{
|
||||
int ogogo = 0; // test this case!
|
||||
// test this case!
|
||||
}
|
||||
case clang::Type::Pointer:
|
||||
{
|
||||
@@ -129,10 +129,10 @@ std::shared_ptr<DataType> CxxTypeNameResolver::typeToDataType(const clang::Type*
|
||||
{
|
||||
std::string templateArgumentNamePart = "<";
|
||||
CxxTemplateArgumentNameResolver resolver(getIgnoredContextDecls());
|
||||
for (int i = 0; i < templateSpecializationType->getNumArgs(); i++)
|
||||
for (size_t i = 0; i < templateSpecializationType->getNumArgs(); i++)
|
||||
{
|
||||
templateArgumentNamePart += resolver.getTemplateArgumentName(templateSpecializationType->getArg(i));
|
||||
if (i < templateSpecializationType->getNumArgs() - 1)
|
||||
if (i + 1 < templateSpecializationType->getNumArgs())
|
||||
templateArgumentNamePart += ", ";
|
||||
}
|
||||
templateArgumentNamePart += ">";
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace utility
|
||||
case clang::TemplateArgument::Template:
|
||||
{
|
||||
clang::TemplateName templateName = argument.getAsTemplate();
|
||||
clang::TemplateName::NameKind::Template;
|
||||
switch (templateName.getKind())
|
||||
{
|
||||
case clang::TemplateName::Template:
|
||||
@@ -75,9 +74,6 @@ namespace utility
|
||||
case clang::TemplateArgument::Pack:
|
||||
LOG_ERROR("Type of template argument not handled: Pack");
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Type of template argument not handled." + argument.getKind());
|
||||
break;
|
||||
}
|
||||
return std::make_shared<NamedDataType>(NameHierarchy());
|
||||
}
|
||||
|
||||
@@ -54,10 +54,11 @@ const std::string& SearchIndex::getWord(Id wordId) const
|
||||
SearchNode* SearchIndex::addNode(NameHierarchy nameHierarchy)
|
||||
{
|
||||
std::deque<Id> nameIds;
|
||||
for (int i = 0; i < nameHierarchy.size(); i++)
|
||||
for (size_t i = 0; i < nameHierarchy.size(); i++)
|
||||
{
|
||||
nameIds.push_back(m_dictionary.getWordId(nameHierarchy[i]->getFullName()));
|
||||
}
|
||||
|
||||
if (nameIds.size())
|
||||
{
|
||||
return m_root.addNodeRecursive(&nameIds, m_dictionary).get();
|
||||
|
||||
Reference in New Issue
Block a user