diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-01-27 11:08:01 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-01-27 11:08:01 +0100 |
commit | 6bd80e559a75a00ca328997d7e54acc6d6030c79 (patch) | |
tree | 30b7b20db9144757285c0e38775a3a5c01aebeaa | |
parent | d5ba9d4e65ade6cc83a76c5cc47eab41ed3ad941 (diff) | |
download | ATCD-6bd80e559a75a00ca328997d7e54acc6d6030c79.tar.gz |
Pass strings as const&
* ACE/ace/XML_Utils/XMLSchema/id_map.hpp:
-rw-r--r-- | ACE/ace/XML_Utils/XMLSchema/id_map.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp index 5b591985db4..a96ad2e116a 100644 --- a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp +++ b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp @@ -56,7 +56,7 @@ //XML document. class Unresolved_IDREF { public: - explicit Unresolved_IDREF(std::basic_string<ACE_TCHAR> &message) : message(message) + explicit Unresolved_IDREF(const std::basic_string<ACE_TCHAR> &message) : message(message) {} ~Unresolved_IDREF(){} std::basic_string<ACE_TCHAR> get_message ( void ) @@ -78,8 +78,8 @@ { } - //Add an ID to the ID map - void add_id (std::basic_string<ACE_TCHAR> id, XSCRT::Type *obj_ref) + // Add an ID to the ID map + void add_id (const std::basic_string<ACE_TCHAR>& id, XSCRT::Type *obj_ref) { if (obj_ref) { @@ -92,8 +92,8 @@ return; } - //Add an IDREF to the IDREF map - void add_idref (std::basic_string<ACE_TCHAR> idref, XSCRT::Type *obj_ref) + // Add an IDREF to the IDREF map + void add_idref (const std::basic_string<ACE_TCHAR>& idref, XSCRT::Type *obj_ref) { if (obj_ref) { @@ -106,7 +106,7 @@ return; } - void resolve_single_idref (std::basic_string<ACE_TCHAR> idref, ::XSCRT::Type * element) + void resolve_single_idref (const std::basic_string<ACE_TCHAR> idref&, ::XSCRT::Type * element) { ID_Map::id_iterator id_iterator = this->id_map_.find(idref); if (id_iterator != this->id_map_.end()) @@ -158,9 +158,9 @@ private: //id_map_: maps the ID string to the element with the // ID attribute + ID_MAP id_map_; //idref_map_: multimap that maps the IDREF string to the // element with the IDREF attribute - ID_MAP id_map_; IDREF_MAP idref_map_; }; |