diff --git a/src/address/address.cpp b/src/address/address.cpp index d7e276123..f35893b62 100644 --- a/src/address/address.cpp +++ b/src/address/address.cpp @@ -68,9 +68,9 @@ Address::Address (const IdentityAddress &identityAddress) : ClonableObject(*new d->internalAddress = sal_address_new(L_STRING_TO_C(uri)); } -Address::Address (const Address &src) : ClonableObject(*new AddressPrivate) { +Address::Address (const Address &other) : ClonableObject(*new AddressPrivate) { L_D(); - SalAddress *salAddress = src.getPrivate()->internalAddress; + SalAddress *salAddress = other.getPrivate()->internalAddress; if (salAddress) d->internalAddress = sal_address_clone(salAddress); } @@ -81,28 +81,28 @@ Address::~Address () { sal_address_destroy(d->internalAddress); } -Address &Address::operator= (const Address &src) { +Address &Address::operator= (const Address &other) { L_D(); - if (this != &src) { + if (this != &other) { if (d->internalAddress) sal_address_destroy(d->internalAddress); - SalAddress *salAddress = src.getPrivate()->internalAddress; + SalAddress *salAddress = other.getPrivate()->internalAddress; d->internalAddress = salAddress ? sal_address_clone(salAddress) : nullptr; } return *this; } -bool Address::operator== (const Address &address) const { - return asString() == address.asString(); +bool Address::operator== (const Address &other) const { + return asString() == other.asString(); } -bool Address::operator!= (const Address &address) const { - return !(*this == address); +bool Address::operator!= (const Address &other) const { + return !(*this == other); } -bool Address::operator< (const Address &address) const { - return asString() < address.asString(); +bool Address::operator< (const Address &other) const { + return asString() < other.asString(); } bool Address::isValid () const { diff --git a/src/address/address.h b/src/address/address.h index 875bc2ee9..cccca9ac8 100644 --- a/src/address/address.h +++ b/src/address/address.h @@ -42,15 +42,15 @@ class LINPHONE_PUBLIC Address : public ClonableObject { public: explicit Address (const std::string &address = ""); Address (const IdentityAddress &identityAddress); - Address (const Address &src); + Address (const Address &other); ~Address (); - Address &operator= (const Address &src); + Address &operator= (const Address &other); - bool operator== (const Address &address) const; - bool operator!= (const Address &address) const; + bool operator== (const Address &other) const; + bool operator!= (const Address &other) const; - bool operator< (const Address &address) const; + bool operator< (const Address &other) const; bool isValid () const; diff --git a/src/address/identity-address.cpp b/src/address/identity-address.cpp index 40c6d5511..7dcc480c2 100644 --- a/src/address/identity-address.cpp +++ b/src/address/identity-address.cpp @@ -53,35 +53,35 @@ IdentityAddress::IdentityAddress (const Address &address) : ClonableObject(*new d->gruu = address.getUriParamValue("gr"); } -IdentityAddress::IdentityAddress (const IdentityAddress &src) : ClonableObject(*new IdentityAddressPrivate) { +IdentityAddress::IdentityAddress (const IdentityAddress &other) : ClonableObject(*new IdentityAddressPrivate) { L_D(); - d->scheme = src.getScheme(); - d->username = src.getUsername(); - d->domain = src.getDomain(); - d->gruu = src.getGruu(); + d->scheme = other.getScheme(); + d->username = other.getUsername(); + d->domain = other.getDomain(); + d->gruu = other.getGruu(); } -IdentityAddress &IdentityAddress::operator= (const IdentityAddress &src) { +IdentityAddress &IdentityAddress::operator= (const IdentityAddress &other) { L_D(); - if (this != &src) { - d->scheme = src.getScheme(); - d->username = src.getUsername(); - d->domain = src.getDomain(); - d->gruu = src.getGruu(); + if (this != &other) { + d->scheme = other.getScheme(); + d->username = other.getUsername(); + d->domain = other.getDomain(); + d->gruu = other.getGruu(); } return *this; } -bool IdentityAddress::operator== (const IdentityAddress &address) const { - return asString() == address.asString(); +bool IdentityAddress::operator== (const IdentityAddress &other) const { + return asString() == other.asString(); } -bool IdentityAddress::operator!= (const IdentityAddress &address) const { - return !(*this == address); +bool IdentityAddress::operator!= (const IdentityAddress &other) const { + return !(*this == other); } -bool IdentityAddress::operator< (const IdentityAddress &address) const { - return asString() < address.asString(); +bool IdentityAddress::operator< (const IdentityAddress &other) const { + return asString() < other.asString(); } bool IdentityAddress::isValid () const { diff --git a/src/address/identity-address.h b/src/address/identity-address.h index aefa87c58..58afd9ff4 100644 --- a/src/address/identity-address.h +++ b/src/address/identity-address.h @@ -33,15 +33,15 @@ class LINPHONE_PUBLIC IdentityAddress : public ClonableObject { public: explicit IdentityAddress (const std::string &address = ""); IdentityAddress (const Address &address); - IdentityAddress (const IdentityAddress &src); + IdentityAddress (const IdentityAddress &other); ~IdentityAddress () = default; - IdentityAddress &operator= (const IdentityAddress &src); + IdentityAddress &operator= (const IdentityAddress &other); - bool operator== (const IdentityAddress &address) const; - bool operator!= (const IdentityAddress &address) const; + bool operator== (const IdentityAddress &other) const; + bool operator!= (const IdentityAddress &other) const; - bool operator< (const IdentityAddress &address) const; + bool operator< (const IdentityAddress &other) const; bool isValid () const; diff --git a/src/chat/chat-room/chat-room-id.cpp b/src/chat/chat-room/chat-room-id.cpp index 8ff0b8d35..7b11fd77d 100644 --- a/src/chat/chat-room/chat-room-id.cpp +++ b/src/chat/chat-room/chat-room-id.cpp @@ -48,19 +48,19 @@ ChatRoomId::ChatRoomId ( L_USE_DEFAULT_CLONABLE_OBJECT_SHARED_IMPL(ChatRoomId); -bool ChatRoomId::operator== (const ChatRoomId &chatRoomId) const { +bool ChatRoomId::operator== (const ChatRoomId &other) const { L_D(); - const ChatRoomIdPrivate *dChatRoomId = chatRoomId.getPrivate(); + const ChatRoomIdPrivate *dChatRoomId = other.getPrivate(); return d->peerAddress == dChatRoomId->peerAddress && d->localAddress == dChatRoomId->localAddress; } -bool ChatRoomId::operator!= (const ChatRoomId &chatRoomId) const { - return !(*this == chatRoomId); +bool ChatRoomId::operator!= (const ChatRoomId &other) const { + return !(*this == other); } -bool ChatRoomId::operator< (const ChatRoomId &chatRoomId) const { +bool ChatRoomId::operator< (const ChatRoomId &other) const { L_D(); - const ChatRoomIdPrivate *dChatRoomId = chatRoomId.getPrivate(); + const ChatRoomIdPrivate *dChatRoomId = other.getPrivate(); return d->peerAddress < dChatRoomId->peerAddress || (d->peerAddress == dChatRoomId->peerAddress && d->localAddress < dChatRoomId->localAddress); } diff --git a/src/chat/chat-room/chat-room-id.h b/src/chat/chat-room/chat-room-id.h index e8954b85f..c82dd0da4 100644 --- a/src/chat/chat-room/chat-room-id.h +++ b/src/chat/chat-room/chat-room-id.h @@ -32,14 +32,14 @@ class LINPHONE_PUBLIC ChatRoomId : public ClonableObject { public: ChatRoomId (); ChatRoomId (const IdentityAddress &peerAddress, const IdentityAddress &localAddress); - ChatRoomId (const ChatRoomId &src); + ChatRoomId (const ChatRoomId &other); - ChatRoomId &operator= (const ChatRoomId &src); + ChatRoomId &operator= (const ChatRoomId &other); - bool operator== (const ChatRoomId &chatRoomId) const; - bool operator!= (const ChatRoomId &chatRoomId) const; + bool operator== (const ChatRoomId &other) const; + bool operator!= (const ChatRoomId &other) const; - bool operator< (const ChatRoomId &chatRoomId) const; + bool operator< (const ChatRoomId &other) const; const IdentityAddress &getPeerAddress () const; const IdentityAddress &getLocalAddress () const; diff --git a/src/conference/params/call-session-params.cpp b/src/conference/params/call-session-params.cpp index 2b65ed6a7..4b8a11912 100644 --- a/src/conference/params/call-session-params.cpp +++ b/src/conference/params/call-session-params.cpp @@ -65,10 +65,10 @@ CallSessionParams::CallSessionParams () : ClonableObject(*new CallSessionParamsP CallSessionParams::CallSessionParams (CallSessionParamsPrivate &p) : ClonableObject(p) {} -CallSessionParams::CallSessionParams (const CallSessionParams &src) +CallSessionParams::CallSessionParams (const CallSessionParams &other) : ClonableObject(*new CallSessionParamsPrivate) { L_D(); - d->clone(src.getPrivate()); + d->clone(other.getPrivate()); } CallSessionParams::~CallSessionParams () { @@ -77,10 +77,10 @@ CallSessionParams::~CallSessionParams () { sal_custom_header_free(d->customHeaders); } -CallSessionParams &CallSessionParams::operator= (const CallSessionParams &src) { +CallSessionParams &CallSessionParams::operator= (const CallSessionParams &other) { L_D(); - if (this != &src) - d->clone(src.getPrivate()); + if (this != &other) + d->clone(other.getPrivate()); return *this; } diff --git a/src/conference/params/call-session-params.h b/src/conference/params/call-session-params.h index fd6fb569d..687b77b17 100644 --- a/src/conference/params/call-session-params.h +++ b/src/conference/params/call-session-params.h @@ -40,10 +40,10 @@ class CallSessionParams : public ClonableObject { public: CallSessionParams (); - CallSessionParams (const CallSessionParams &src); + CallSessionParams (const CallSessionParams &other); virtual ~CallSessionParams (); - CallSessionParams &operator= (const CallSessionParams &src); + CallSessionParams &operator= (const CallSessionParams &other); virtual void initDefault (const std::shared_ptr &core); diff --git a/src/conference/params/media-session-params.cpp b/src/conference/params/media-session-params.cpp index 892210de4..680e8385b 100644 --- a/src/conference/params/media-session-params.cpp +++ b/src/conference/params/media-session-params.cpp @@ -203,11 +203,11 @@ MediaSessionParams::MediaSessionParams () : CallSessionParams(*new MediaSessionP memset(d->customSdpMediaAttributes, 0, sizeof(d->customSdpMediaAttributes)); } -MediaSessionParams::MediaSessionParams (const MediaSessionParams &src) +MediaSessionParams::MediaSessionParams (const MediaSessionParams &other) : CallSessionParams(*new MediaSessionParamsPrivate) { L_D(); memset(d->customSdpMediaAttributes, 0, sizeof(d->customSdpMediaAttributes)); - d->clone(src.getPrivate()); + d->clone(other.getPrivate()); } MediaSessionParams::~MediaSessionParams () { @@ -215,10 +215,10 @@ MediaSessionParams::~MediaSessionParams () { d->clean(); } -MediaSessionParams &MediaSessionParams::operator= (const MediaSessionParams &src) { +MediaSessionParams &MediaSessionParams::operator= (const MediaSessionParams &other) { L_D(); - if (this != &src) - d->clone(src.getPrivate()); + if (this != &other) + d->clone(other.getPrivate()); return *this; } diff --git a/src/conference/params/media-session-params.h b/src/conference/params/media-session-params.h index 3f1df29df..80ceff38f 100644 --- a/src/conference/params/media-session-params.h +++ b/src/conference/params/media-session-params.h @@ -38,10 +38,10 @@ class MediaSessionParams : public CallSessionParams { public: MediaSessionParams (); - MediaSessionParams (const MediaSessionParams &src); + MediaSessionParams (const MediaSessionParams &other); virtual ~MediaSessionParams (); - MediaSessionParams &operator= (const MediaSessionParams &src); + MediaSessionParams &operator= (const MediaSessionParams &other); void initDefault (const std::shared_ptr &core) override; diff --git a/src/content/content-type.cpp b/src/content/content-type.cpp index 66b22e7f9..97a0ad488 100644 --- a/src/content/content-type.cpp +++ b/src/content/content-type.cpp @@ -91,26 +91,26 @@ ContentType::ContentType ( setParameter(parameter); } -ContentType::ContentType (const ContentType &src) : ContentType(src.getType(), src.getSubType(), src.getParameter()) {} +ContentType::ContentType (const ContentType &other) : ContentType(other.getType(), other.getSubType(), other.getParameter()) {} -ContentType &ContentType::operator= (const ContentType &src) { - if (this != &src) { - setType(src.getType()); - setSubType(src.getSubType()); - setParameter(src.getParameter()); +ContentType &ContentType::operator= (const ContentType &other) { + if (this != &other) { + setType(other.getType()); + setSubType(other.getSubType()); + setParameter(other.getParameter()); } return *this; } -bool ContentType::operator== (const ContentType &contentType) const { - return getType() == contentType.getType() && - getSubType() == contentType.getSubType() && - getParameter() == contentType.getParameter(); +bool ContentType::operator== (const ContentType &other) const { + return getType() == other.getType() && + getSubType() == other.getSubType() && + getParameter() == other.getParameter(); } -bool ContentType::operator!= (const ContentType &contentType) const { - return !(*this == contentType); +bool ContentType::operator!= (const ContentType &other) const { + return !(*this == other); } const string &ContentType::getType () const { diff --git a/src/content/content-type.h b/src/content/content-type.h index d37168f08..b13063115 100644 --- a/src/content/content-type.h +++ b/src/content/content-type.h @@ -33,17 +33,17 @@ public: explicit ContentType (const std::string &contentType = ""); ContentType (const std::string &type, const std::string &subType); ContentType (const std::string &type, const std::string &subType, const std::string ¶meter); - ContentType (const ContentType &src); + ContentType (const ContentType &other); - ContentType &operator= (const ContentType &src); + ContentType &operator= (const ContentType &other); - bool operator== (const ContentType &contentType) const; - bool operator!= (const ContentType &contentType) const; + bool operator== (const ContentType &other) const; + bool operator!= (const ContentType &other) const; // Delete these operators to prevent putting complicated content-type strings // in the code. Instead define static const ContentType objects below. - bool operator== (const std::string &contentType) const = delete; - bool operator!= (const std::string &contentType) const = delete; + bool operator== (const std::string &other) const = delete; + bool operator!= (const std::string &other) const = delete; bool isEmpty () const; bool isValid () const; diff --git a/src/content/content.cpp b/src/content/content.cpp index 732996494..d1cc14628 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -34,18 +34,18 @@ LINPHONE_BEGIN_NAMESPACE Content::Content () : ClonableObject(*new ContentPrivate) {} -Content::Content (const Content &src) : ClonableObject(*new ContentPrivate), AppDataContainer(src) { +Content::Content (const Content &other) : ClonableObject(*new ContentPrivate), AppDataContainer(other) { L_D(); - d->body = src.getBody(); - d->contentType = src.getContentType(); - d->contentDisposition = src.getContentDisposition(); + d->body = other.getBody(); + d->contentType = other.getContentType(); + d->contentDisposition = other.getContentDisposition(); } -Content::Content (Content &&src) : ClonableObject(*new ContentPrivate), AppDataContainer(move(src)) { +Content::Content (Content &&other) : ClonableObject(*new ContentPrivate), AppDataContainer(move(other)) { L_D(); - d->body = move(src.getPrivate()->body); - d->contentType = move(src.getPrivate()->contentType); - d->contentDisposition = move(src.getPrivate()->contentDisposition); + d->body = move(other.getPrivate()->body); + d->contentType = move(other.getPrivate()->contentType); + d->contentDisposition = move(other.getPrivate()->contentDisposition); } Content::Content (ContentPrivate &p) : ClonableObject(p) {} @@ -59,32 +59,32 @@ Content::~Content () { d->body.assign(d->body.size(), 0); } -Content &Content::operator= (const Content &src) { +Content &Content::operator= (const Content &other) { L_D(); - if (this != &src) { - d->body = src.getBody(); - d->contentType = src.getContentType(); - d->contentDisposition = src.getContentDisposition(); - AppDataContainer::operator=(src); + if (this != &other) { + d->body = other.getBody(); + d->contentType = other.getContentType(); + d->contentDisposition = other.getContentDisposition(); + AppDataContainer::operator=(other); } return *this; } -Content &Content::operator= (Content &&src) { +Content &Content::operator= (Content &&other) { L_D(); - d->body = move(src.getPrivate()->body); - d->contentType = move(src.getPrivate()->contentType); - d->contentDisposition = move(src.getPrivate()->contentDisposition); - AppDataContainer::operator=(move(src)); + d->body = move(other.getPrivate()->body); + d->contentType = move(other.getPrivate()->contentType); + d->contentDisposition = move(other.getPrivate()->contentDisposition); + AppDataContainer::operator=(move(other)); return *this; } -bool Content::operator== (const Content &content) const { +bool Content::operator== (const Content &other) const { L_D(); - return d->contentType == content.getContentType() && - d->body == content.getBody() && - d->contentDisposition == content.getContentDisposition(); + return d->contentType == other.getContentType() && + d->body == other.getBody() && + d->contentDisposition == other.getContentDisposition(); } const ContentType &Content::getContentType () const { diff --git a/src/content/content.h b/src/content/content.h index 4885feadf..d639ffe15 100644 --- a/src/content/content.h +++ b/src/content/content.h @@ -37,14 +37,14 @@ class ContentPrivate; class LINPHONE_PUBLIC Content : public ClonableObject, public AppDataContainer { public: Content (); - Content (const Content &src); - Content (Content &&src); + Content (const Content &other); + Content (Content &&other); ~Content (); - Content &operator= (const Content &src); - Content &operator= (Content &&src); + Content &operator= (const Content &other); + Content &operator= (Content &&other); - bool operator== (const Content &content) const; + bool operator== (const Content &other) const; const ContentType &getContentType () const; void setContentType (const ContentType &contentType); diff --git a/src/content/file-content.cpp b/src/content/file-content.cpp index 09de486b6..851d935d3 100644 --- a/src/content/file-content.cpp +++ b/src/content/file-content.cpp @@ -43,52 +43,52 @@ public: FileContent::FileContent () : Content(*new FileContentPrivate) {} -FileContent::FileContent (const FileContent &src) : Content(*new FileContentPrivate) { +FileContent::FileContent (const FileContent &other) : Content(*new FileContentPrivate) { L_D(); - d->fileName = src.getFileName(); - d->filePath = src.getFilePath(); - d->fileSize = src.getFileSize(); - d->fileKey = src.getFileKey(); + d->fileName = other.getFileName(); + d->filePath = other.getFilePath(); + d->fileSize = other.getFileSize(); + d->fileKey = other.getFileKey(); } -FileContent::FileContent (FileContent &&src) : Content(*new FileContentPrivate) { +FileContent::FileContent (FileContent &&other) : Content(*new FileContentPrivate) { L_D(); - d->fileName = move(src.getPrivate()->fileName); - d->filePath = move(src.getPrivate()->filePath); - d->fileSize = move(src.getPrivate()->fileSize); - d->fileKey = move(src.getPrivate()->fileKey); + d->fileName = move(other.getPrivate()->fileName); + d->filePath = move(other.getPrivate()->filePath); + d->fileSize = move(other.getPrivate()->fileSize); + d->fileKey = move(other.getPrivate()->fileKey); } -FileContent &FileContent::operator= (const FileContent &src) { +FileContent &FileContent::operator= (const FileContent &other) { L_D(); - if (this != &src) { - Content::operator=(src); - d->fileName = src.getFileName(); - d->filePath = src.getFilePath(); - d->fileSize = src.getFileSize(); - d->fileKey = src.getFileKey(); + if (this != &other) { + Content::operator=(other); + d->fileName = other.getFileName(); + d->filePath = other.getFilePath(); + d->fileSize = other.getFileSize(); + d->fileKey = other.getFileKey(); } return *this; } -FileContent &FileContent::operator= (FileContent &&src) { +FileContent &FileContent::operator= (FileContent &&other) { L_D(); - Content::operator=(move(src)); - d->fileName = move(src.getPrivate()->fileName); - d->filePath = move(src.getPrivate()->filePath); - d->fileSize = move(src.getPrivate()->fileSize); - d->fileKey = move(src.getPrivate()->fileKey); + Content::operator=(move(other)); + d->fileName = move(other.getPrivate()->fileName); + d->filePath = move(other.getPrivate()->filePath); + d->fileSize = move(other.getPrivate()->fileSize); + d->fileKey = move(other.getPrivate()->fileKey); return *this; } -bool FileContent::operator== (const FileContent &content) const { +bool FileContent::operator== (const FileContent &other) const { L_D(); - return Content::operator==(content) && - d->fileName == content.getFileName() && - d->filePath == content.getFilePath() && - d->fileSize == content.getFileSize() && - d->fileKey == content.getFileKey(); + return Content::operator==(other) && + d->fileName == other.getFileName() && + d->filePath == other.getFilePath() && + d->fileSize == other.getFileSize() && + d->fileKey == other.getFileKey(); } void FileContent::setFileSize (size_t size) { diff --git a/src/content/file-content.h b/src/content/file-content.h index 4876370fb..645fc6312 100644 --- a/src/content/file-content.h +++ b/src/content/file-content.h @@ -31,13 +31,13 @@ class FileContentPrivate; class LINPHONE_PUBLIC FileContent : public Content { public: FileContent (); - FileContent (const FileContent &src); - FileContent (FileContent &&src); + FileContent (const FileContent &other); + FileContent (FileContent &&other); - FileContent &operator= (const FileContent &src); - FileContent &operator= (FileContent &&src); + FileContent &operator= (const FileContent &other); + FileContent &operator= (FileContent &&other); - bool operator== (const FileContent &content) const; + bool operator== (const FileContent &other) const; void setFileSize (size_t size); size_t getFileSize () const; diff --git a/src/content/file-transfer-content.cpp b/src/content/file-transfer-content.cpp index 4ce62bc19..4bc5ed691 100644 --- a/src/content/file-transfer-content.cpp +++ b/src/content/file-transfer-content.cpp @@ -44,56 +44,56 @@ public: FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {} -FileTransferContent::FileTransferContent (const FileTransferContent &src) : Content(*new FileTransferContentPrivate) { +FileTransferContent::FileTransferContent (const FileTransferContent &other) : Content(*new FileTransferContentPrivate) { L_D(); - d->fileName = src.getFileName(); - d->fileUrl = src.getFileUrl(); - d->filePath = src.getFilePath(); - d->fileContent = src.getFileContent(); - d->fileSize = src.getFileSize(); + d->fileName = other.getFileName(); + d->fileUrl = other.getFileUrl(); + d->filePath = other.getFilePath(); + d->fileContent = other.getFileContent(); + d->fileSize = other.getFileSize(); } -FileTransferContent::FileTransferContent (FileTransferContent &&src) : Content(*new FileTransferContentPrivate) { +FileTransferContent::FileTransferContent (FileTransferContent &&other) : Content(*new FileTransferContentPrivate) { L_D(); - d->fileName = move(src.getPrivate()->fileName); - d->fileUrl = move(src.getPrivate()->fileUrl); - d->filePath = move(src.getPrivate()->filePath); - d->fileContent = move(src.getPrivate()->fileContent); - d->fileSize = move(src.getPrivate()->fileSize); + d->fileName = move(other.getPrivate()->fileName); + d->fileUrl = move(other.getPrivate()->fileUrl); + d->filePath = move(other.getPrivate()->filePath); + d->fileContent = move(other.getPrivate()->fileContent); + d->fileSize = move(other.getPrivate()->fileSize); } -FileTransferContent &FileTransferContent::operator= (const FileTransferContent &src) { +FileTransferContent &FileTransferContent::operator= (const FileTransferContent &other) { L_D(); - if (this != &src) { - Content::operator=(src); - d->fileName = src.getFileName(); - d->fileUrl = src.getFileUrl(); - d->filePath = src.getFilePath(); - d->fileContent = src.getFileContent(); - d->fileSize = src.getFileSize(); + if (this != &other) { + Content::operator=(other); + d->fileName = other.getFileName(); + d->fileUrl = other.getFileUrl(); + d->filePath = other.getFilePath(); + d->fileContent = other.getFileContent(); + d->fileSize = other.getFileSize(); } return *this; } -FileTransferContent &FileTransferContent::operator= (FileTransferContent &&src) { +FileTransferContent &FileTransferContent::operator= (FileTransferContent &&other) { L_D(); - Content::operator=(move(src)); - d->fileName = move(src.getPrivate()->fileName); - d->fileUrl = move(src.getPrivate()->fileUrl); - d->filePath = move(src.getPrivate()->filePath); - d->fileContent = move(src.getPrivate()->fileContent); - d->fileSize = move(src.getPrivate()->fileSize); + Content::operator=(move(other)); + d->fileName = move(other.getPrivate()->fileName); + d->fileUrl = move(other.getPrivate()->fileUrl); + d->filePath = move(other.getPrivate()->filePath); + d->fileContent = move(other.getPrivate()->fileContent); + d->fileSize = move(other.getPrivate()->fileSize); return *this; } -bool FileTransferContent::operator== (const FileTransferContent &content) const { +bool FileTransferContent::operator== (const FileTransferContent &other) const { L_D(); - return Content::operator==(content) && - d->fileName == content.getFileName() && - d->fileUrl == content.getFileUrl() && - d->filePath == content.getFilePath() && - d->fileSize == content.getFileSize(); + return Content::operator==(other) && + d->fileName == other.getFileName() && + d->fileUrl == other.getFileUrl() && + d->filePath == other.getFilePath() && + d->fileSize == other.getFileSize(); } void FileTransferContent::setFileName (const string &name) { diff --git a/src/content/file-transfer-content.h b/src/content/file-transfer-content.h index 4b668a0ac..59b4cc125 100644 --- a/src/content/file-transfer-content.h +++ b/src/content/file-transfer-content.h @@ -32,13 +32,13 @@ class FileTransferContentPrivate; class LINPHONE_PUBLIC FileTransferContent : public Content { public: FileTransferContent (); - FileTransferContent (const FileTransferContent &src); - FileTransferContent (FileTransferContent &&src); + FileTransferContent (const FileTransferContent &other); + FileTransferContent (FileTransferContent &&other); - FileTransferContent &operator= (const FileTransferContent &src); - FileTransferContent &operator= (FileTransferContent &&src); + FileTransferContent &operator= (const FileTransferContent &other); + FileTransferContent &operator= (FileTransferContent &&other); - bool operator== (const FileTransferContent &content) const; + bool operator== (const FileTransferContent &other) const; void setFileName (const std::string &name); const std::string &getFileName () const; diff --git a/src/db/main-db-key.cpp b/src/db/main-db-key.cpp index 68c0e4451..11557b04b 100644 --- a/src/db/main-db-key.cpp +++ b/src/db/main-db-key.cpp @@ -37,23 +37,23 @@ MainDbKey::MainDbKey (const shared_ptr &core, long long storageId) : MainD d->storageId = storageId; } -MainDbKey::MainDbKey (const MainDbKey &src) : MainDbKey() { +MainDbKey::MainDbKey (const MainDbKey &other) : MainDbKey() { L_D(); - const MainDbKeyPrivate *dSrc = src.getPrivate(); + const MainDbKeyPrivate *dOther = other.getPrivate(); - d->core = dSrc->core; - d->storageId = dSrc->storageId; + d->core = dOther->core; + d->storageId = dOther->storageId; } MainDbKey::~MainDbKey () {} -MainDbKey &MainDbKey::operator= (const MainDbKey &src) { +MainDbKey &MainDbKey::operator= (const MainDbKey &other) { L_D(); - if (this != &src) { - const MainDbKeyPrivate *dSrc = src.getPrivate(); - d->core = dSrc->core; - d->storageId = dSrc->storageId; + if (this != &other) { + const MainDbKeyPrivate *dOther = other.getPrivate(); + d->core = dOther->core; + d->storageId = dOther->storageId; } return *this; diff --git a/src/db/main-db-key.h b/src/db/main-db-key.h index 04b69efc7..bd94582ab 100644 --- a/src/db/main-db-key.h +++ b/src/db/main-db-key.h @@ -36,10 +36,10 @@ class MainDbKey : public ClonableObject { public: MainDbKey (); MainDbKey (const std::shared_ptr &core, long long storageId); - MainDbKey (const MainDbKey &src); + MainDbKey (const MainDbKey &other); virtual ~MainDbKey () = 0; - MainDbKey &operator= (const MainDbKey &src); + MainDbKey &operator= (const MainDbKey &other); bool isValid () const; diff --git a/src/db/session/db-session.h b/src/db/session/db-session.h index 1b27635f6..a94fa7abb 100644 --- a/src/db/session/db-session.h +++ b/src/db/session/db-session.h @@ -45,9 +45,9 @@ class DbSession : public ClonableObject { public: DbSession (); explicit DbSession (const std::string &uri); - DbSession (const DbSession &src); + DbSession (const DbSession &other); - DbSession &operator= (const DbSession &src); + DbSession &operator= (const DbSession &other); operator bool () const; diff --git a/src/dial-plan/dial-plan.cpp b/src/dial-plan/dial-plan.cpp index 5802b7f46..c3b20a49d 100644 --- a/src/dial-plan/dial-plan.cpp +++ b/src/dial-plan/dial-plan.cpp @@ -283,24 +283,24 @@ DialPlan::DialPlan ( d->internationalCallPrefix = icp; } -DialPlan::DialPlan (const DialPlan &src) : ClonableObject(*new DialPlanPrivate) { +DialPlan::DialPlan (const DialPlan &other) : ClonableObject(*new DialPlanPrivate) { L_D(); - d->country = src.getCountry(); - d->isoCountryCode = src.getIsoCountryCode(); - d->countryCallingCode = src.getCountryCallingCode(); - d->nationalNumberLength = src.getNationalNumberLength(); - d->internationalCallPrefix = src.getInternationalCallPrefix(); + d->country = other.getCountry(); + d->isoCountryCode = other.getIsoCountryCode(); + d->countryCallingCode = other.getCountryCallingCode(); + d->nationalNumberLength = other.getNationalNumberLength(); + d->internationalCallPrefix = other.getInternationalCallPrefix(); } -DialPlan &DialPlan::operator= (const DialPlan &src) { +DialPlan &DialPlan::operator= (const DialPlan &other) { L_D(); - if (this != &src) { - d->country = src.getCountry(); - d->isoCountryCode = src.getIsoCountryCode(); - d->countryCallingCode = src.getCountryCallingCode(); - d->nationalNumberLength = src.getNationalNumberLength(); - d->internationalCallPrefix = src.getInternationalCallPrefix(); + if (this != &other) { + d->country = other.getCountry(); + d->isoCountryCode = other.getIsoCountryCode(); + d->countryCallingCode = other.getCountryCallingCode(); + d->nationalNumberLength = other.getNationalNumberLength(); + d->internationalCallPrefix = other.getInternationalCallPrefix(); } return *this; diff --git a/src/dial-plan/dial-plan.h b/src/dial-plan/dial-plan.h index 7ea380251..d944f2e98 100644 --- a/src/dial-plan/dial-plan.h +++ b/src/dial-plan/dial-plan.h @@ -39,9 +39,9 @@ public: int nnl = 0, const std::string &icp = "" ); - DialPlan (const DialPlan &src); + DialPlan (const DialPlan &other); - DialPlan &operator= (const DialPlan &src); + DialPlan &operator= (const DialPlan &other); const std::string &getCountry () const; const std::string &getIsoCountryCode () const; diff --git a/src/object/app-data-container.cpp b/src/object/app-data-container.cpp index 644bbfc0d..b55a5e180 100644 --- a/src/object/app-data-container.cpp +++ b/src/object/app-data-container.cpp @@ -41,19 +41,19 @@ AppDataContainer::AppDataContainer () : mPrivate(new AppDataContainerPrivate) { d->appData = make_shared>(); } -AppDataContainer::AppDataContainer (const AppDataContainer &src) : mPrivate(new AppDataContainerPrivate) { +AppDataContainer::AppDataContainer (const AppDataContainer &other) : mPrivate(new AppDataContainerPrivate) { L_D(); - d->appData = src.getPrivate()->appData; + d->appData = other.getPrivate()->appData; } AppDataContainer::~AppDataContainer () { delete mPrivate; } -AppDataContainer &AppDataContainer::operator= (const AppDataContainer &src) { +AppDataContainer &AppDataContainer::operator= (const AppDataContainer &other) { L_D(); - if (this != &src) - d->appData = src.getPrivate()->appData; + if (this != &other) + d->appData = other.getPrivate()->appData; return *this; } diff --git a/src/object/app-data-container.h b/src/object/app-data-container.h index 7dc87ca6f..05641a004 100644 --- a/src/object/app-data-container.h +++ b/src/object/app-data-container.h @@ -34,10 +34,10 @@ class AppDataContainerPrivate; class LINPHONE_PUBLIC AppDataContainer { public: AppDataContainer (); - AppDataContainer (const AppDataContainer &src); + AppDataContainer (const AppDataContainer &other); virtual ~AppDataContainer (); - AppDataContainer &operator= (const AppDataContainer &src); + AppDataContainer &operator= (const AppDataContainer &other); const std::unordered_map &getAppDataMap () const; diff --git a/src/object/clonable-object.h b/src/object/clonable-object.h index b1951cb7b..0352ce3dd 100644 --- a/src/object/clonable-object.h +++ b/src/object/clonable-object.h @@ -26,12 +26,12 @@ // ============================================================================= #define L_USE_DEFAULT_CLONABLE_OBJECT_SHARED_IMPL(CLASS) \ - CLASS::CLASS (const CLASS &src) : ClonableObject( \ - const_cast::type &>(*src.getPrivate()) \ + CLASS::CLASS (const CLASS &other) : ClonableObject( \ + const_cast::type &>(*other.getPrivate()) \ ) {} \ - CLASS &CLASS::operator= (const CLASS &src) { \ - if (this != &src) \ - setRef(*src.getPrivate()); \ + CLASS &CLASS::operator= (const CLASS &other) { \ + if (this != &other) \ + setRef(*other.getPrivate()); \ return *this; \ } diff --git a/src/object/property-container.h b/src/object/property-container.h index 50e0abc47..53a885ddd 100644 --- a/src/object/property-container.h +++ b/src/object/property-container.h @@ -31,10 +31,10 @@ class PropertyContainerPrivate; class LINPHONE_PUBLIC PropertyContainer { public: PropertyContainer (); - PropertyContainer (const PropertyContainer &src); + PropertyContainer (const PropertyContainer &other); virtual ~PropertyContainer (); - PropertyContainer &operator= (const PropertyContainer &src); + PropertyContainer &operator= (const PropertyContainer &other); Variant getProperty (const std::string &name) const; void setProperty (const std::string &name, const Variant &value); diff --git a/src/variant/variant.cpp b/src/variant/variant.cpp index 75aa69953..6ef1f5992 100644 --- a/src/variant/variant.cpp +++ b/src/variant/variant.cpp @@ -92,27 +92,27 @@ Variant::Variant (Type type) : Variant() { d->setType(type); } -Variant::Variant (const Variant &src) { +Variant::Variant (const Variant &other) { // Don't call placement new. L_ASSERT(!mPrivate); mPrivate = new VariantPrivate(); L_D(); - int type = src.getPrivate()->getType(); + int type = other.getPrivate()->getType(); d->setType(type); - const VariantPrivate::Value &value = src.getPrivate()->value; + const VariantPrivate::Value &value = other.getPrivate()->value; if (type == String) *d->value.str = *value.str; else d->value = value; } -Variant::Variant (Variant &&src) { +Variant::Variant (Variant &&other) { // Don't call placement new. L_ASSERT(!mPrivate); - ::swap(mPrivate, src.mPrivate); + ::swap(mPrivate, other.mPrivate); } Variant::Variant (int value) : Variant(Int) { @@ -188,31 +188,31 @@ Variant::~Variant () { delete d; } -bool Variant::operator!= (const Variant &variant) const { +bool Variant::operator!= (const Variant &other) const { // TODO. return false; } -bool Variant::operator< (const Variant &variant) const { +bool Variant::operator< (const Variant &other) const { // TODO. return false; } -bool Variant::operator<= (const Variant &variant) const { +bool Variant::operator<= (const Variant &other) const { // TODO. return false; } -Variant &Variant::operator= (const Variant &variant) { +Variant &Variant::operator= (const Variant &other) { L_D(); - if (this != &variant) { + if (this != &other) { // Update type. - int type = variant.getPrivate()->getType(); + int type = other.getPrivate()->getType(); d->setType(type); // Update value. - const VariantPrivate::Value &value = variant.getPrivate()->value; + const VariantPrivate::Value &value = other.getPrivate()->value; if (type == String) *d->value.str = *value.str; else @@ -222,22 +222,22 @@ Variant &Variant::operator= (const Variant &variant) { return *this; } -Variant &Variant::operator= (Variant &&variant) { - ::swap(mPrivate, variant.mPrivate); +Variant &Variant::operator= (Variant &&other) { + ::swap(mPrivate, other.mPrivate); return *this; } -bool Variant::operator== (const Variant &variant) const { +bool Variant::operator== (const Variant &other) const { // TODO. return false; } -bool Variant::operator> (const Variant &variant) const { +bool Variant::operator> (const Variant &other) const { // TODO. return false; } -bool Variant::operator>= (const Variant &variant) const { +bool Variant::operator>= (const Variant &other) const { // TODO. return false; } @@ -252,7 +252,7 @@ void Variant::clear () { d->setType(Invalid); } -void Variant::swap (const Variant &variant) { +void Variant::swap (const Variant &other) { // TODO. } diff --git a/src/variant/variant.h b/src/variant/variant.h index 17fb51a35..f22cf8f12 100644 --- a/src/variant/variant.h +++ b/src/variant/variant.h @@ -64,8 +64,8 @@ public: Variant (); Variant (Type type); - Variant (const Variant &src); - Variant (Variant &&src); + Variant (const Variant &other); + Variant (Variant &&other); Variant (int value); Variant (unsigned int value); @@ -87,14 +87,14 @@ public: ~Variant (); - bool operator!= (const Variant &variant) const; - bool operator< (const Variant &variant) const; - bool operator<= (const Variant &variant) const; - Variant &operator= (const Variant &variant); - Variant &operator= (Variant &&variant); - bool operator== (const Variant &variant) const; - bool operator> (const Variant &variant) const; - bool operator>= (const Variant &variant) const; + bool operator!= (const Variant &other) const; + bool operator< (const Variant &other) const; + bool operator<= (const Variant &other) const; + Variant &operator= (const Variant &other); + Variant &operator= (Variant &&other); + bool operator== (const Variant &other) const; + bool operator> (const Variant &other) const; + bool operator>= (const Variant &other) const; template void setValue (const T &value) {