@@ -180,10 +180,11 @@ map<string, map<string, string>> ConfigDBConnector_Native::get_table(string tabl
180
180
auto const & entry = client.hgetall <map<string, string>>(key);
181
181
size_t pos = key.find (TABLE_NAME_SEPARATOR);
182
182
string row;
183
- if (pos ! = string::npos)
183
+ if (pos = = string::npos)
184
184
{
185
- row = key. substr (pos + 1 ) ;
185
+ continue ;
186
186
}
187
+ row = key.substr (pos + 1 );
187
188
data[row] = entry;
188
189
}
189
190
return data;
@@ -248,12 +249,11 @@ map<string, map<string, map<string, string>>> ConfigDBConnector_Native::get_conf
248
249
for (string key: keys)
249
250
{
250
251
size_t pos = key.find (TABLE_NAME_SEPARATOR);
251
- string table_name = key.substr (0 , pos);
252
- string row;
253
- if (pos != string::npos)
254
- {
255
- row = key.substr (pos + 1 );
252
+ if (pos == string::npos) {
253
+ continue ;
256
254
}
255
+ string table_name = key.substr (0 , pos);
256
+ string row = key.substr (pos + 1 );
257
257
auto const & entry = client.hgetall <map<string, string>>(key);
258
258
259
259
if (!entry.empty ())
@@ -411,10 +411,11 @@ int ConfigDBPipeConnector_Native::_get_config(DBConnector& client, RedisTransact
411
411
size_t pos = key.find (TABLE_NAME_SEPARATOR);
412
412
string table_name = key.substr (0 , pos);
413
413
string row;
414
- if (pos ! = string::npos)
414
+ if (pos = = string::npos)
415
415
{
416
- row = key. substr (pos + 1 ) ;
416
+ continue ;
417
417
}
418
+ row = key.substr (pos + 1 );
418
419
419
420
auto reply = pipe.dequeueReply ();
420
421
RedisReply r (reply);
0 commit comments