From 33edd95a159680c5ab1a1472dbbe508916dd49e9 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Fri, 10 Nov 2017 11:25:29 +0100 Subject: [PATCH] fix(Core): remove useless includes --- src/object/object-p.h | 2 -- src/object/object.cpp | 2 -- src/object/object.h | 2 -- src/object/property-container.cpp | 8 +++++--- src/utils/utils.cpp | 4 ++-- src/variant/variant.cpp | 2 ++ 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/object/object-p.h b/src/object/object-p.h index e4b46c53f..eafbb9ce4 100644 --- a/src/object/object-p.h +++ b/src/object/object-p.h @@ -20,12 +20,10 @@ #ifndef _OBJECT_P_H_ #define _OBJECT_P_H_ -#include #include #include "base-object-p.h" #include "object.h" -#include "variant/variant.h" // ============================================================================= diff --git a/src/object/object.cpp b/src/object/object.cpp index e22adb37f..77e333aa2 100644 --- a/src/object/object.cpp +++ b/src/object/object.cpp @@ -20,8 +20,6 @@ #include "logger/logger.h" #include "object-p.h" -#include "object.h" - // ============================================================================= using namespace std; diff --git a/src/object/object.h b/src/object/object.h index f929df63a..e132fc075 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -41,8 +41,6 @@ class LINPHONE_PUBLIC Object : friend class ObjectFactory; public: - virtual ~Object () = default; - std::shared_ptr getSharedFromThis (); std::shared_ptr getSharedFromThis () const; diff --git a/src/object/property-container.cpp b/src/object/property-container.cpp index 44d2cb1de..36cbe6993 100644 --- a/src/object/property-container.cpp +++ b/src/object/property-container.cpp @@ -36,9 +36,11 @@ public: PropertyContainer::PropertyContainer () : mPrivate(new PropertyContainerPrivate) {} -// Empty copy constructor. Don't change this pattern. -// PropertyContainer is an Entity component, not a simple structure. -// An Entity is UNIQUE. +/* + * Empty copy constructor. Don't change this pattern. + * PropertyContainer is an Entity component, not a simple structure. + * An Entity is UNIQUE. + */ PropertyContainer::PropertyContainer (const PropertyContainer &) : mPrivate(new PropertyContainerPrivate) {} PropertyContainer::~PropertyContainer () { diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 0013cb2f5..8d4f55efe 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -94,10 +94,10 @@ string Utils::toString (const void *val) { // ----------------------------------------------------------------------------- #define STRING_TO_NUMBER_IMPL(TYPE, SUFFIX) \ - TYPE Utils::sto ## SUFFIX(const string &str, size_t *idx, int base) { \ + TYPE Utils::sto ## SUFFIX (const string &str, size_t *idx, int base) { \ return sto ## SUFFIX(str.c_str(), idx, base); \ } \ - TYPE Utils::sto ## SUFFIX(const char *str, size_t *idx, int base) { \ + TYPE Utils::sto ## SUFFIX (const char *str, size_t *idx, int base) { \ char *p; \ TYPE v = strto ## SUFFIX(str, &p, base); \ if (idx) \ diff --git a/src/variant/variant.cpp b/src/variant/variant.cpp index efa7d084a..45aea40bc 100644 --- a/src/variant/variant.cpp +++ b/src/variant/variant.cpp @@ -77,6 +77,8 @@ private: int type = Variant::Invalid; }; +// ----------------------------------------------------------------------------- + Variant::Variant () { // Private can exist. (placement new) if (!mPrivate)