(clang format) fix indent and make (rarely) accessor/setters in class on a single line
This commit is contained in:
parent
c68848eecc
commit
977e8794ec
@ -11,7 +11,7 @@ AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: InlineOnly
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
|
@ -62,10 +62,7 @@ namespace LUrlParser
|
||||
}
|
||||
|
||||
/// return 'true' if the parsing was successful
|
||||
bool IsValid() const
|
||||
{
|
||||
return m_ErrorCode == LUrlParserError_Ok;
|
||||
}
|
||||
bool IsValid() const { return m_ErrorCode == LUrlParserError_Ok; }
|
||||
|
||||
/// helper to convert the port number to int, return 'true' if the port is valid (within the
|
||||
/// 0..65535 range)
|
||||
|
@ -89,16 +89,10 @@ namespace ix
|
||||
void setGenericAttributes(const std::string& attrName, const Json::Value& value);
|
||||
|
||||
/// Set a unique id for the session. A uuid can be used.
|
||||
void setSession(const std::string& session)
|
||||
{
|
||||
_session = session;
|
||||
}
|
||||
void setSession(const std::string& session) { _session = session; }
|
||||
|
||||
/// Get the unique id used to identify the current session
|
||||
const std::string& getSession() const
|
||||
{
|
||||
return _session;
|
||||
}
|
||||
const std::string& getSession() const { return _session; }
|
||||
|
||||
/// Return the number of milliseconds since the epoch (~1970)
|
||||
uint64_t getMillisecondsSinceEpoch() const;
|
||||
|
@ -9,10 +9,7 @@ namespace ix
|
||||
using LogFunc = std::function<void(const char*)>;
|
||||
static void Log(const char* msg);
|
||||
|
||||
static void setLogFunction(LogFunc& func)
|
||||
{
|
||||
_currentLogger = func;
|
||||
}
|
||||
static void setLogFunction(LogFunc& func) { _currentLogger = func; }
|
||||
|
||||
private:
|
||||
static LogFunc _currentLogger;
|
||||
|
@ -16,37 +16,16 @@ namespace snake
|
||||
class SnakeConnectionState : public ix::ConnectionState
|
||||
{
|
||||
public:
|
||||
std::string getNonce()
|
||||
{
|
||||
return _nonce;
|
||||
}
|
||||
void setNonce(const std::string& nonce)
|
||||
{
|
||||
_nonce = nonce;
|
||||
}
|
||||
std::string getNonce() { return _nonce; }
|
||||
void setNonce(const std::string& nonce) { _nonce = nonce; }
|
||||
|
||||
std::string appkey()
|
||||
{
|
||||
return _appkey;
|
||||
}
|
||||
void setAppkey(const std::string& appkey)
|
||||
{
|
||||
_appkey = appkey;
|
||||
}
|
||||
std::string appkey() { return _appkey; }
|
||||
void setAppkey(const std::string& appkey) { _appkey = appkey; }
|
||||
|
||||
std::string role()
|
||||
{
|
||||
return _role;
|
||||
}
|
||||
void setRole(const std::string& role)
|
||||
{
|
||||
_role = role;
|
||||
}
|
||||
std::string role() { return _role; }
|
||||
void setRole(const std::string& role) { _role = role; }
|
||||
|
||||
ix::RedisClient& redisClient()
|
||||
{
|
||||
return _redisClient;
|
||||
}
|
||||
ix::RedisClient& redisClient() { return _redisClient; }
|
||||
|
||||
std::future<void> fut;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user