Skip to content

Commit 3ba0d6f

Browse files
jrassisaghm
authored andcommitted
CXX-1187 Minor style/lint fixes to uri.cpp and test/uri.cpp
1 parent bff8804 commit 3ba0d6f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/mongocxx/test/uri.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ TEST_CASE("URI", "[uri]") {
3939
REQUIRE(u.hosts()[0].port == 27017);
4040
REQUIRE(u.options().empty());
4141
REQUIRE(u.password() == "");
42-
REQUIRE(u.read_concern().acknowledge_level() == mongocxx::read_concern::level::k_server_default);
42+
REQUIRE(u.read_concern().acknowledge_level() ==
43+
mongocxx::read_concern::level::k_server_default);
4344
REQUIRE(u.read_concern().acknowledge_string().empty());
4445
REQUIRE(u.read_preference().mode() == mongocxx::read_preference::read_mode::k_primary);
4546
REQUIRE(!u.read_preference().tags());
@@ -53,7 +54,8 @@ TEST_CASE("URI", "[uri]") {
5354
REQUIRE(!u.write_concern().nodes());
5455
REQUIRE(u.write_concern().timeout() == std::chrono::milliseconds{0});
5556
REQUIRE(u.write_concern().acknowledge_level());
56-
REQUIRE(*u.write_concern().acknowledge_level() == mongocxx::write_concern::level::k_default);
57+
REQUIRE(*u.write_concern().acknowledge_level() ==
58+
mongocxx::write_concern::level::k_default);
5759
}
5860

5961
SECTION("Valid URI") {

src/mongocxx/uri.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ MONGOCXX_INLINE_NAMESPACE_BEGIN
3030

3131
namespace {
3232

33-
// Some of the 'uri_get_*' string accessors may return nullptr.
34-
// Check for this case and convert to the empty string.
33+
// Some of the 'uri_get_*' string accessors may return nullptr. Check for this case and convert to
34+
// the empty string.
3535
std::string to_string_null_safe(const char* str) {
3636
if (str == nullptr) {
3737
return std::string{};
3838
}
3939
return str;
4040
}
4141

42-
} // namespace
42+
} // namespace
4343

4444
const std::string uri::k_default_uri = "mongodb://localhost:27017";
4545

0 commit comments

Comments
 (0)