From f36a7476b3c4e7a6dfca977853bddfa7b25b64ad Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Fri, 11 Jan 2019 19:32:33 +0100 Subject: [PATCH] [#99,!197] Addressed review comments. --- src/lib/dhcpsrv/cfgmgr.h | 2 +- src/lib/dhcpsrv/srv_config.h | 4 ++-- src/lib/process/config_base.h | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/dhcpsrv/cfgmgr.h b/src/lib/dhcpsrv/cfgmgr.h index 69bf61df39..5df381bcc3 100644 --- a/src/lib/dhcpsrv/cfgmgr.h +++ b/src/lib/dhcpsrv/cfgmgr.h @@ -231,7 +231,7 @@ public: /// @return non-null pointer to the staging configuration. SrvConfigPtr getStagingCfg(); - /// @brief Creates external configuration and returns pointer to it. + /// @brief Creates an external configuration and returns pointer to it. /// /// External configurations are those that come from other sources than /// from the configuration file, e.g. a database or a command. They diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index a2b4c76611..c30e1304fd 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -479,7 +479,7 @@ public: /// /// This method is used when two or more configurations held in the /// @c SrvConfig objects need to be combined into a single configuration. - /// Specifically, when the configuration backend is used, the part of + /// Specifically, when the configuration backend is used, then part of /// the server configuration comes from the configuration file and /// stored in the staging configuration. The other part of the /// configuration comes from the database. The configuration fetched @@ -498,7 +498,7 @@ public: /// The data that do not overlap between the two objects is simply /// inserted into this configuration. /// - /// @note The call to @c merge may modify the data in the @c other + /// @warning The call to @c merge may modify the data in the @c other /// object. Therefore, the caller must not rely on the data held /// in the @c other object after the call to @c merge. Also, the /// data held in @c other must not be modified after the call to diff --git a/src/lib/process/config_base.h b/src/lib/process/config_base.h index 9bb8884bf2..8de72f2e92 100644 --- a/src/lib/process/config_base.h +++ b/src/lib/process/config_base.h @@ -66,6 +66,15 @@ public: /// existing configuration if the new logging configuration is /// non-null and non-empty. /// + /// @warning The call to @c merge may modify the data in the @c other + /// object. Therefore, the caller must not rely on the data held + /// in the @c other object after the call to @c merge. Also, the + /// data held in @c other must not be modified after the call to + /// @c merge because it may affect the merged configuration. + /// + /// If a derivation of this class implements the @c merge method + /// it should call @c ConfigBase::merge. + /// /// @param other the other configuration to be merged into this /// configuration. virtual void merge(const ConfigBase& other); -- 2.47.2