uncrustify: newline before opening brace for function definitions
Asked Answered
B

1

6

Using uncrustify 0.60

I set nl_fcall_brace=force expecting the following result: newline between function arguments and the opening brace of function body

string toNsdName(const string& sid) 
{
   if (sid.empty())
   {
      return "";
   }
   string temp(sid);
   replace_all(temp, PERIOD_MARK, DASH_MARK);
   return temp;
}

--- Instead code remains ---

string toNsdName(const string& sid) {
   if (sid.empty())
   {
      return "";
   }
   string temp(sid);
   replace_all(temp, PERIOD_MARK, DASH_MARK);
   return temp;
}
Brost answered 21/6, 2013 at 23:45 Comment(0)
B
12

Apparently what was needed is "nl_fdef_brace=add"

Brost answered 22/6, 2013 at 0:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.