Skip to content

Commit 3f63faa

Browse files
vkumar-mdbEvergreen Agent
authored andcommitted
SERVER-81512 Removed using namespace fmt::literals from global namespace
1 parent d6072dc commit 3f63faa

File tree

65 files changed

+65
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+65
-15
lines changed

src/mongo/db/auth/authz_manager_external_state_local.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474

7575

7676
namespace mongo {
77+
using namespace fmt::literals;
7778

7879
using std::vector;
7980
using ResolveRoleOption = AuthzManagerExternalStateLocal::ResolveRoleOption;

src/mongo/db/auth/authz_manager_external_state_mock.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ void addRoleNameObjectsToArrayElement(mutablebson::Element array, RoleNameIterat
9090
void addPrivilegeObjectsOrWarningsToArrayElement(mutablebson::Element privilegesElement,
9191
mutablebson::Element warningsElement,
9292
const PrivilegeVector& privileges) {
93+
using namespace fmt::literals;
9394
for (const auto& privilege : privileges) {
9495
try {
9596
fassert(17178, privilegesElement.appendObject("", privilege.toBSON()));

src/mongo/db/auth/privilege.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "mongo/util/assert_util.h"
5151

5252
namespace mongo {
53+
using namespace fmt::literals;
5354
namespace {
5455
void uassertNoConflict(StringData resource, StringData found, bool cond) {
5556
uassert(

src/mongo/db/auth/resource_pattern.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class ResourcePattern {
149149
* "<dbName>.system.buckets.<collectionName>"
150150
*/
151151
static ResourcePattern forExactSystemBucketsCollection(const NamespaceString& nss) {
152+
using namespace fmt::literals;
152153
uassert(ErrorCodes::InvalidNamespace,
153154
"Invalid namespace '{}.system.buckets.{}'"_format(
154155
nss.dbName().toStringForErrorMsg(), nss.coll()),

src/mongo/db/auth/validated_tenancy_scope.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969

7070
namespace mongo::auth {
7171
namespace {
72+
using namespace fmt::literals;
73+
7274
const auto validatedTenancyScopeDecoration =
7375
OperationContext::declareDecoration<boost::optional<ValidatedTenancyScope>>();
7476

src/mongo/db/basic_types.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#include "mongo/bson/bsonobjbuilder.h"
3939
#include "mongo/stdx/variant.h"
4040

41-
using namespace fmt::literals;
42-
4341
namespace mongo {
4442

4543
/**

src/mongo/db/catalog/drop_collection.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ Status isDroppableCollection(OperationContext* opCtx, const NamespaceString& nss
738738
nss.isSystemDotJavascript() || nss.isSystemStatsCollection();
739739
};
740740

741+
using namespace fmt::literals;
741742
if (nss.isSystemDotProfile()) {
742743
if (CollectionCatalog::get(opCtx)->getDatabaseProfileLevel(nss.dbName()) != 0)
743744
return Status(ErrorCodes::IllegalOperation,

src/mongo/db/catalog/virtual_collection_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct ExternalDataSourceMetadata {
4747
StorageTypeEnum storageTypeEnum,
4848
FileTypeEnum fileTypeEnum)
4949
: url(urlStr), storageType(storageTypeEnum), fileType(fileTypeEnum) {
50+
using namespace fmt::literals;
5051
uassert(6968500,
5152
"File url must start with {}"_format(kUrlProtocolFile),
5253
urlStr.startsWith(kUrlProtocolFile));

src/mongo/db/cluster_transaction_api.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ StringMap<std::string> clusterCommandTranslations = {
5959
{"update", "clusterUpdate"}};
6060

6161
BSONObj replaceCommandNameWithClusterCommandName(BSONObj cmdObj) {
62+
using namespace fmt::literals;
6263
auto cmdName = cmdObj.firstElement().fieldNameStringData();
6364
auto newNameIt = clusterCommandTranslations.find(cmdName);
6465
uassert(6349501,

src/mongo/db/commands/mr_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@
8888
namespace mongo::map_reduce_common {
8989

9090
namespace {
91-
9291
using namespace std::string_literals;
9392

9493
Status interpretTranslationError(DBException* ex, const MapReduceCommandRequest& parsedMr) {
94+
using namespace fmt::literals;
95+
9596
auto status = ex->toStatus();
9697
auto outOptions = parsedMr.getOutOptions();
9798
const auto outNss = outOptions.getDatabaseName()

0 commit comments

Comments
 (0)