mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
NO-OP: Re-indent websockets code
"Always use Tabstops for block-indent (the code must be formatted correctly with "[TAB] = N spaces" for any value of N). Use space only for alignment." - https://ardour.org/styleguide.html
This commit is contained in:
parent
224be91211
commit
5e3480ba8f
23 changed files with 1260 additions and 1217 deletions
|
|
@ -23,49 +23,49 @@
|
|||
bool
|
||||
ClientContext::has_state (const NodeState& node_state)
|
||||
{
|
||||
ClientState::iterator it = _state.find (node_state);
|
||||
ClientState::iterator it = _state.find (node_state);
|
||||
|
||||
if (it == _state.end ()) {
|
||||
return false;
|
||||
}
|
||||
if (it == _state.end ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int n_val = node_state.n_val ();
|
||||
int n_val = node_state.n_val ();
|
||||
|
||||
if (it->n_val () != n_val) {
|
||||
return false;
|
||||
}
|
||||
if (it->n_val () != n_val) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n_val; i++) {
|
||||
if (it->nth_val (i) != node_state.nth_val (i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < n_val; i++) {
|
||||
if (it->nth_val (i) != node_state.nth_val (i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
ClientContext::update_state (const NodeState& node_state)
|
||||
{
|
||||
ClientState::iterator it = _state.find (node_state);
|
||||
ClientState::iterator it = _state.find (node_state);
|
||||
|
||||
if (it != _state.end ()) {
|
||||
_state.erase (it);
|
||||
}
|
||||
if (it != _state.end ()) {
|
||||
_state.erase (it);
|
||||
}
|
||||
|
||||
_state.insert (node_state);
|
||||
_state.insert (node_state);
|
||||
}
|
||||
|
||||
std::string
|
||||
ClientContext::debug_str ()
|
||||
{
|
||||
std::stringstream ss;
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "client = " << std::hex << _wsi << std::endl;
|
||||
|
||||
for (ClientState::iterator it = _state.begin (); it != _state.end (); ++it) {
|
||||
ss << " - " << it->debug_str () << std::endl;
|
||||
}
|
||||
ss << "client = " << std::hex << _wsi << std::endl;
|
||||
|
||||
return ss.str ();
|
||||
for (ClientState::iterator it = _state.begin (); it != _state.end (); ++it) {
|
||||
ss << " - " << it->debug_str () << std::endl;
|
||||
}
|
||||
|
||||
return ss.str ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue