提交 7ccd4421 编写于 作者: G groot

format code

上级 534e6e50
...@@ -173,7 +173,7 @@ MySQLMetaImpl::~MySQLMetaImpl() { ...@@ -173,7 +173,7 @@ MySQLMetaImpl::~MySQLMetaImpl() {
Status Status
MySQLMetaImpl::NextTableId(std::string& table_id) { MySQLMetaImpl::NextTableId(std::string& table_id) {
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
std::stringstream ss; std::stringstream ss;
SimpleIDGenerator g; SimpleIDGenerator g;
ss << g.GetNextIDNumber(); ss << g.GetNextIDNumber();
...@@ -183,7 +183,7 @@ MySQLMetaImpl::NextTableId(std::string& table_id) { ...@@ -183,7 +183,7 @@ MySQLMetaImpl::NextTableId(std::string& table_id) {
Status Status
MySQLMetaImpl::NextFileId(std::string& file_id) { MySQLMetaImpl::NextFileId(std::string& file_id) {
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
std::stringstream ss; std::stringstream ss;
SimpleIDGenerator g; SimpleIDGenerator g;
ss << g.GetNextIDNumber(); ss << g.GetNextIDNumber();
......
...@@ -97,7 +97,7 @@ SqliteMetaImpl::~SqliteMetaImpl() { ...@@ -97,7 +97,7 @@ SqliteMetaImpl::~SqliteMetaImpl() {
Status Status
SqliteMetaImpl::NextTableId(std::string &table_id) { SqliteMetaImpl::NextTableId(std::string &table_id) {
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
std::stringstream ss; std::stringstream ss;
SimpleIDGenerator g; SimpleIDGenerator g;
ss << g.GetNextIDNumber(); ss << g.GetNextIDNumber();
...@@ -107,7 +107,7 @@ SqliteMetaImpl::NextTableId(std::string &table_id) { ...@@ -107,7 +107,7 @@ SqliteMetaImpl::NextTableId(std::string &table_id) {
Status Status
SqliteMetaImpl::NextFileId(std::string &file_id) { SqliteMetaImpl::NextFileId(std::string &file_id) {
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
std::stringstream ss; std::stringstream ss;
SimpleIDGenerator g; SimpleIDGenerator g;
ss << g.GetNextIDNumber(); ss << g.GetNextIDNumber();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册