diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:35:43 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:35:43 +0200 |
commit | bb54ccd7a3422f9f3835d71dc71bded0a766fd88 (patch) | |
tree | 2beda45dfa7cfc3fdb8ae198a171e2ab48083a0e /vdslib | |
parent | e198573919f269bf62bb7ff22c0fb5797375ef9c (diff) |
Pass stringref by value
Diffstat (limited to 'vdslib')
-rw-r--r-- | vdslib/src/vespa/vdslib/state/diskstate.cpp | 4 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/state/diskstate.h | 4 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/state/nodestate.cpp | 4 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/state/nodestate.h | 4 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/state/state.cpp | 2 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/state/state.h | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/vdslib/src/vespa/vdslib/state/diskstate.cpp b/vdslib/src/vespa/vdslib/state/diskstate.cpp index 56e9f36b442..0f41bada230 100644 --- a/vdslib/src/vespa/vdslib/state/diskstate.cpp +++ b/vdslib/src/vespa/vdslib/state/diskstate.cpp @@ -20,7 +20,7 @@ DiskState::DiskState() setState(State::UP); } -DiskState::DiskState(const State& state, const vespalib::stringref & description, +DiskState::DiskState(const State& state, vespalib::stringref description, double capacity) : _state(0), _description(description), @@ -79,7 +79,7 @@ DiskState::DiskState(vespalib::stringref serialized) } void -DiskState::serialize(vespalib::asciistream & out, const vespalib::stringref & prefix, +DiskState::serialize(vespalib::asciistream & out, vespalib::stringref prefix, bool includeDescription, bool useOldFormat) const { // Always give node state if not part of a system state diff --git a/vdslib/src/vespa/vdslib/state/diskstate.h b/vdslib/src/vespa/vdslib/state/diskstate.h index fb71f5c9733..7c50ea9dacc 100644 --- a/vdslib/src/vespa/vdslib/state/diskstate.h +++ b/vdslib/src/vespa/vdslib/state/diskstate.h @@ -22,10 +22,10 @@ public: typedef std::shared_ptr<DiskState> SP; DiskState(); - DiskState(const State&, const vespalib::stringref & description = "", double capacity = 1.0); + DiskState(const State&, vespalib::stringref description = "", double capacity = 1.0); explicit DiskState(vespalib::stringref serialized); - void serialize(vespalib::asciistream & out, const vespalib::stringref & prefix = "", + void serialize(vespalib::asciistream & out, vespalib::stringref prefix = "", bool includeReason = true, bool useOldFormat = false) const; const State& getState() const { return *_state; } diff --git a/vdslib/src/vespa/vdslib/state/nodestate.cpp b/vdslib/src/vespa/vdslib/state/nodestate.cpp index c6da5757de3..3ca92d6730d 100644 --- a/vdslib/src/vespa/vdslib/state/nodestate.cpp +++ b/vdslib/src/vespa/vdslib/state/nodestate.cpp @@ -37,7 +37,7 @@ NodeState::NodeState() } NodeState::NodeState(const NodeType& type, const State& state, - const vespalib::stringref & description, + vespalib::stringref description, double capacity, uint16_t reliability) : _type(&type), _state(0), @@ -269,7 +269,7 @@ namespace { } void -NodeState::serialize(vespalib::asciistream & out, const vespalib::stringref & prefix, +NodeState::serialize(vespalib::asciistream & out, vespalib::stringref prefix, bool includeDescription, bool includeDiskDescription, bool useOldFormat) const { diff --git a/vdslib/src/vespa/vdslib/state/nodestate.h b/vdslib/src/vespa/vdslib/state/nodestate.h index fef251bdaf1..75cf5044acc 100644 --- a/vdslib/src/vespa/vdslib/state/nodestate.h +++ b/vdslib/src/vespa/vdslib/state/nodestate.h @@ -43,7 +43,7 @@ public: NodeState(NodeState &&); NodeState & operator = (NodeState &&); NodeState(const NodeType& nodeType, const State&, - const vespalib::stringref & description = "", + vespalib::stringref description = "", double capacity = 1.0, uint16_t reliability = 1); /** Set type if you want to verify that content fit with the given type. */ NodeState(vespalib::stringref serialized, const NodeType* nodeType = 0); @@ -54,7 +54,7 @@ public: * part of the system state. Don't set prefix if you want to be able to * recreate the nodestate with NodeState(string) function. */ - void serialize(vespalib::asciistream & out, const vespalib::stringref & prefix = "", + void serialize(vespalib::asciistream & out, vespalib::stringref prefix = "", bool includeDescription = true, bool includeDiskDescription = false, bool useOldFormat = false) const; diff --git a/vdslib/src/vespa/vdslib/state/state.cpp b/vdslib/src/vespa/vdslib/state/state.cpp index b3109492c90..041753beb82 100644 --- a/vdslib/src/vespa/vdslib/state/state.cpp +++ b/vdslib/src/vespa/vdslib/state/state.cpp @@ -39,7 +39,7 @@ State::get(vespalib::stringref serialized) "Unknown state " + serialized + " given.", VESPA_STRLOC); } -State::State(vespalib::stringref name, const vespalib::stringref & serialized, +State::State(vespalib::stringref name, vespalib::stringref serialized, uint8_t rank, bool validDisk, bool validDistributorReported, bool validStorageReported, bool validDistributorWanted, bool validStorageWanted, diff --git a/vdslib/src/vespa/vdslib/state/state.h b/vdslib/src/vespa/vdslib/state/state.h index 75f5e1cbb8e..eb1c9841053 100644 --- a/vdslib/src/vespa/vdslib/state/state.h +++ b/vdslib/src/vespa/vdslib/state/state.h @@ -26,7 +26,7 @@ class State : public vespalib::Printable { bool _validClusterState; State(const State&); - State(vespalib::stringref name, const vespalib::stringref & serialized, + State(vespalib::stringref name, vespalib::stringref serialized, uint8_t rank, bool validDisk, bool validDistributorReported, bool validStorageReported, bool validDistributorWanted, bool validStorageWanted, |