Skip to content

Commit

Permalink
Fixed const copy assignment operators: #16
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkost committed Dec 5, 2024
1 parent 8216164 commit 3556b8f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ class MessageObserver
{
}

/**
* @brief Avoid copy assignment of MessageObserver.
*/
MessageObserver& operator=(const MessageObserver&) = delete;

/**
* @brief Move constructor for observer.
* @param other other observer.
Expand Down
26 changes: 13 additions & 13 deletions knp/core-library/include/knp/core/message_endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
* @kaspersky_support Artiom N.
* @date 23.01.2023
* @license Apache 2.0
* @copyright © 2024 AO Kaspersky Lab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* @copyright © 2024 AO Kaspersky Lab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Expand Down Expand Up @@ -118,7 +118,7 @@ class MessageEndpoint : private boost::noncopyable
/**
* @brief Avoid copy assignment of an endpoint.
*/
MessageEndpoint &operator=(MessageEndpoint &) = delete;
MessageEndpoint &operator=(const MessageEndpoint &) = delete;

/**
* @brief Message endpoint destructor.
Expand Down

0 comments on commit 3556b8f

Please sign in to comment.