build: fix compiler and cmake warnings
added missing virtual destructor fixed a warning in token.h: expression with side effects will be evaluated despite being used as an operand to 'typeid' CMP00043 Cmake warning added missing override keyword
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
class GraphViewStyleImpl
|
||||
{
|
||||
public:
|
||||
virtual ~GraphViewStyleImpl() { }
|
||||
virtual float getCharWidthForNodeType(Node::NodeType type) = 0;
|
||||
virtual float getCharHeightForNodeType(Node::NodeType type) = 0;
|
||||
};
|
||||
|
||||
@@ -56,7 +56,8 @@ ComponentType* Token::getComponent() const
|
||||
{
|
||||
for (std::shared_ptr<TokenComponent> component: m_components)
|
||||
{
|
||||
if (typeid(ComponentType) == typeid(*(component.get())))
|
||||
TokenComponent* componentPtr = component.get();
|
||||
if (typeid(ComponentType) == typeid(*componentPtr))
|
||||
{
|
||||
return dynamic_cast<ComponentType*>(component.get());
|
||||
}
|
||||
@@ -70,7 +71,8 @@ std::shared_ptr<ComponentType> Token::removeComponent()
|
||||
for (size_t i = 0; i < m_components.size(); i++)
|
||||
{
|
||||
std::shared_ptr<TokenComponent> component = m_components[i];
|
||||
if (typeid(ComponentType) == typeid(*(component.get())))
|
||||
TokenComponent* componentPtr = component.get();
|
||||
if (typeid(ComponentType) == typeid(*componentPtr))
|
||||
{
|
||||
m_components.erase(m_components.begin() + i);
|
||||
return std::dynamic_pointer_cast<ComponentType>(component);
|
||||
|
||||
@@ -11,7 +11,7 @@ class FileManager
|
||||
{
|
||||
public:
|
||||
FileManager();
|
||||
~FileManager();
|
||||
virtual ~FileManager();
|
||||
|
||||
const std::vector<FilePath>& getSourcePaths() const;
|
||||
const std::vector<FilePath>& getIncludePaths() const;
|
||||
|
||||
Reference in New Issue
Block a user