diff options
-rw-r--r-- | document/src/vespa/document/repo/documenttyperepo.cpp | 3 | ||||
-rw-r--r-- | vdslib/src/vespa/vdslib/distribution/group.cpp | 5 | ||||
-rw-r--r-- | vespalib/src/tests/stllike/asciistream_test.cpp | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/document/src/vespa/document/repo/documenttyperepo.cpp b/document/src/vespa/document/repo/documenttyperepo.cpp index 338cbf3bcc4..78d668a4886 100644 --- a/document/src/vespa/document/repo/documenttyperepo.cpp +++ b/document/src/vespa/document/repo/documenttyperepo.cpp @@ -384,7 +384,8 @@ void addDefaultDocument(DocumentTypeMap &type_map) { AnnotationType::UP(new AnnotationType(*annotation_types[i]))); } - type_map[data_types->doc_type->getId()] = data_types.release(); + uint32_t typeId = data_types->doc_type->getId(); + type_map[typeId] = data_types.release(); } const DataTypeRepo &lookupRepo(int32_t id, const DocumentTypeMap &type_map) { diff --git a/vdslib/src/vespa/vdslib/distribution/group.cpp b/vdslib/src/vespa/vdslib/distribution/group.cpp index b1a81c85dbb..8ad3dcb2f80 100644 --- a/vdslib/src/vespa/vdslib/distribution/group.cpp +++ b/vdslib/src/vespa/vdslib/distribution/group.cpp @@ -116,7 +116,8 @@ Group::addSubGroup(Group::UP group) "Another subgroup with same index is already added.", VESPA_STRLOC); } - _subGroups[group->getIndex()] = group.release(); + auto index = group->getIndex(); + _subGroups[index] = group.release(); } void @@ -203,4 +204,4 @@ Group::getDistributionConfigHash() const { } } -}
\ No newline at end of file +} diff --git a/vespalib/src/tests/stllike/asciistream_test.cpp b/vespalib/src/tests/stllike/asciistream_test.cpp index 63066a1bf14..958eb80392a 100644 --- a/vespalib/src/tests/stllike/asciistream_test.cpp +++ b/vespalib/src/tests/stllike/asciistream_test.cpp @@ -103,7 +103,8 @@ AsciistreamTest::testIllegalNumbers() float f(0); EXPECT_EXCEPTION(is >> f, IllegalArgumentException, "float value is outside of range '7777777777777777777777777777777777777777'"); EXPECT_EQUAL(40u, is.size()); - is << "e" << is.str(); + vespalib::string tmp = is.str(); + is << "e" << tmp; EXPECT_EQUAL(81u, is.size()); double d(0); EXPECT_EXCEPTION(is >> d, IllegalArgumentException, "double value is outside of range '7777777777777777777777777777777777777777e7777777777777777777777777777777777777777'"); |