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