summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/generic.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-29 15:23:52 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-30 10:16:17 -0400
commit064c45a6a0688700d7836038db8057cda559dbd6 (patch)
tree17ac22e471cc6bb143f57d970151e5035285505e /src/mongo/db/commands/generic.cpp
parent38b1b8a675993d2d12ffba5976c7344223b56640 (diff)
downloadmongo-064c45a6a0688700d7836038db8057cda559dbd6.tar.gz
SERVER-23407 Get rid of public fields in the Command class
Diffstat (limited to 'src/mongo/db/commands/generic.cpp')
-rw-r--r--src/mongo/db/commands/generic.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/mongo/db/commands/generic.cpp b/src/mongo/db/commands/generic.cpp
index c2459534f4d..9795e7f2b3e 100644
--- a/src/mongo/db/commands/generic.cpp
+++ b/src/mongo/db/commands/generic.cpp
@@ -1,30 +1,30 @@
/**
-* Copyright (C) 2012 10gen Inc.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License, version 3,
-* as published by the Free Software Foundation.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-* As a special exception, the copyright holders give permission to link the
-* code of portions of this program with the OpenSSL library under certain
-* conditions as described in each individual source file and distribute
-* linked combinations including the program with the OpenSSL library. You
-* must comply with the GNU Affero General Public License in all respects for
-* all of the code used other than as permitted herein. If you modify file(s)
-* with this exception, you may extend this exception to your version of the
-* file(s), but you are not obligated to do so. If you do not wish to do so,
-* delete this exception statement from your version. If you delete this
-* exception statement from all source files in the program, then also delete
-* it in the license file.
-*/
+ * Copyright (C) 2012-2016 MongoDB Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * As a special exception, the copyright holders give permission to link the
+ * code of portions of this program with the OpenSSL library under certain
+ * conditions as described in each individual source file and distribute
+ * linked combinations including the program with the OpenSSL library. You
+ * must comply with the GNU Affero General Public License in all respects
+ * for all of the code used other than as permitted herein. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you do not
+ * wish to do so, delete this exception statement from your version. If you
+ * delete this exception statement from all source files in the program,
+ * then also delete it in the license file.
+ */
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand
@@ -259,16 +259,16 @@ public:
std::vector<Command*> commands;
for (CommandMap::const_iterator it = _commands->begin(); it != _commands->end(); ++it) {
// don't show oldnames
- if (it->first == it->second->name)
+ if (it->first == it->second->getName())
commands.push_back(it->second);
}
std::sort(commands.begin(),
commands.end(),
- [](Command* lhs, Command* rhs) { return (lhs->name) < (rhs->name); });
+ [](Command* lhs, Command* rhs) { return (lhs->getName()) < (rhs->getName()); });
BSONObjBuilder b(result.subobjStart("commands"));
for (const auto& c : commands) {
- BSONObjBuilder temp(b.subobjStart(c->name));
+ BSONObjBuilder temp(b.subobjStart(c->getName()));
{
stringstream help;