summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-07-27 19:41:28 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-07-31 17:27:05 +0200
commit711cf1ec760d706599b69968f08137116a1e3ac9 (patch)
tree19ac83126318a5dfc184025a46563414cdc703ba /document
parentc1bc4aaa25bae5f473622f4e7d62ef88bdd3f0f2 (diff)
Add some final keywords to improve inlining
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/fieldvalue/literalfieldvalue.h4
-rw-r--r--document/src/vespa/document/fieldvalue/numericfieldvalue.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/document/src/vespa/document/fieldvalue/literalfieldvalue.h b/document/src/vespa/document/fieldvalue/literalfieldvalue.h
index 57bfae2bcd3..d72e734b6a6 100644
--- a/document/src/vespa/document/fieldvalue/literalfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/literalfieldvalue.h
@@ -54,11 +54,11 @@ public:
_value = _backing;
_altered = true;
}
- size_t hash() const override { return vespalib::hashValue(_value.c_str()); }
+ size_t hash() const override final { return vespalib::hashValue(_value.c_str()); }
void setValue(const char* val, size_t size) { setValue(stringref(val, size)); }
int compare(const FieldValue& other) const override;
- int fastCompare(const FieldValue& other) const override;
+ int fastCompare(const FieldValue& other) const override final;
vespalib::string getAsString() const override;
std::pair<const char*, size_t> getAsRaw() const override;
diff --git a/document/src/vespa/document/fieldvalue/numericfieldvalue.h b/document/src/vespa/document/fieldvalue/numericfieldvalue.h
index d119778eef4..2f44153c09c 100644
--- a/document/src/vespa/document/fieldvalue/numericfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/numericfieldvalue.h
@@ -38,14 +38,14 @@ public:
FieldValue& assign(const FieldValue&) override ;
int compare(const FieldValue& other) const override;
- int fastCompare(const FieldValue& other) const override;
+ int fastCompare(const FieldValue& other) const override final;
FieldValue& operator=(const vespalib::stringref &) override;
FieldValue& operator=(int32_t) override;
FieldValue& operator=(int64_t) override;
FieldValue& operator=(float) override;
FieldValue& operator=(double) override;
- size_t hash() const override { return vespalib::hash<Number>()(_value); }
+ size_t hash() const override final { return vespalib::hash<Number>()(_value); }
char getAsByte() const override;
int32_t getAsInt() const override;
@@ -55,7 +55,7 @@ public:
vespalib::string getAsString() const override;
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- bool hasChanged() const override { return _altered; }
+ bool hasChanged() const override final { return _altered; }
};
} // document