From ca621623661d69eaf733761d968ac79273cec5c9 Mon Sep 17 00:00:00 2001 From: Vivian Nguyen Date: Tue, 26 Mar 2024 11:54:09 -0500 Subject: [PATCH] Add brackets --- libtiledbsoma/src/soma/soma_array.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libtiledbsoma/src/soma/soma_array.cc b/libtiledbsoma/src/soma/soma_array.cc index edc8b888f6..93dda3537c 100644 --- a/libtiledbsoma/src/soma/soma_array.cc +++ b/libtiledbsoma/src/soma/soma_array.cc @@ -561,19 +561,22 @@ void SOMAArray::set_metadata( } void SOMAArray::delete_metadata(const std::string& key) { - if (key.compare(SOMA_OBJECT_TYPE_KEY) == 0) + if (key.compare(SOMA_OBJECT_TYPE_KEY) == 0) { throw TileDBSOMAError(SOMA_OBJECT_TYPE_KEY + " cannot be deleted."); + } - if (key.compare(ENCODING_VERSION_KEY) == 0) + if (key.compare(ENCODING_VERSION_KEY) == 0) { throw TileDBSOMAError(ENCODING_VERSION_KEY + " cannot be deleted."); + } arr_->delete_metadata(key); metadata_.erase(key); } std::optional SOMAArray::get_metadata(const std::string& key) { - if (metadata_.count(key) == 0) + if (metadata_.count(key) == 0) { return std::nullopt; + } return metadata_[key]; }