mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 19:29:27 +00:00
fix(Object): little fixes, remove useless friend and add assert and getSharedFromThis
This commit is contained in:
parent
105e63f271
commit
d70c38f9f5
7 changed files with 14 additions and 3 deletions
|
|
@ -27,6 +27,8 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class AppDataContainerPrivate {
|
||||
public:
|
||||
shared_ptr<unordered_map<string, string>> appData;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _BASE_OBJECT_P_H_
|
||||
#define _BASE_OBJECT_P_H_
|
||||
#ifndef _BASE_OBJECT_P_H_
|
||||
#define _BASE_OBJECT_P_H_
|
||||
|
||||
#include "linphone/utils/general.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Object::Object (ObjectPrivate &p) : BaseObject(p) {}
|
||||
|
||||
shared_ptr<Object> Object::getSharedFromThis () {
|
||||
|
|
@ -39,6 +41,8 @@ shared_ptr<const Object> Object::getSharedFromThis () const {
|
|||
lFatal() << "Object " << this << " was not created with make_shared.";
|
||||
}
|
||||
|
||||
// Unable to reach this point.
|
||||
L_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ class LINPHONE_PUBLIC Object :
|
|||
public std::enable_shared_from_this<Object>,
|
||||
public BaseObject,
|
||||
public PropertyContainer {
|
||||
friend class ObjectFactory;
|
||||
|
||||
public:
|
||||
std::shared_ptr<Object> getSharedFromThis ();
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class PropertyContainerPrivate {
|
||||
public:
|
||||
unordered_map<string, Variant> properties;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool Utils::iequals (const string &a, const string &b) {
|
||||
size_t size = a.size();
|
||||
if (b.size() != size)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class VariantPrivate {
|
||||
public:
|
||||
union Value {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue