Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22655

Configuration modernisation - update to range-based for loops

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Minor
    • 5.0.0
    • .master
    • couchbase-bucket

    Description

      The Configuration class uses C++03 style manual for loops for iterating through various data structures - e.g. the output stream operator:

      std::ostream& operator <<(std::ostream &out, const Configuration &config) {
          LockHolder lh(const_cast<std::mutex&> (config.mutex));
          std::map<std::string, Configuration::value_t>::const_iterator iter;
          for (iter = config.attributes.begin(); iter != config.attributes.end();
              ++iter) {
              ...
      

      The code can be simplified to use C++ range-based for loops instead.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            premkumar.thangamani Premkumar Thangamani (Inactive)
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty