-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2904 from guy-maurel/IndentMemberFunctionCall
Indent the member function call
- Loading branch information
Showing
5 changed files
with
188 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
indent_with_tabs = 0 | ||
indent_member_single = true | ||
use_indent_continue_only_once = true | ||
nl_before_member = force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include <iostream> | ||
#include <sstream> | ||
#include <string> | ||
|
||
struct StringBuilder | ||
{ | ||
template <typename T> | ||
StringBuilder& append(const T& thing) | ||
{ | ||
ss << thing; | ||
return *this; | ||
} | ||
std::string build() | ||
{ | ||
return ss | ||
.str(); | ||
} | ||
std::stringstream ss; | ||
}; | ||
|
||
int main() | ||
{ | ||
std::string my_____String = StringBuilder() | ||
.append(7) | ||
.append(" + ") | ||
.append(21) | ||
.append(" = ") | ||
.append(7 + 21) | ||
.build(); | ||
std::string my_____String = StringBuilder() | ||
.append(7) | ||
.append(" + ") | ||
.append(21) | ||
.append(" = ") | ||
.append(7 + 21) | ||
.build(); | ||
|
||
std::cout << my___String << std::endl; | ||
} | ||
|
||
void function() | ||
{ | ||
auto response = ResponseBuilder_1(1) | ||
.setStatus_1(status) | ||
.finish_1(); | ||
|
||
ResponseBuilder_2(request) | ||
.setStatus_2(status) | ||
.finish_2(); | ||
|
||
return ResponseBuilder_3(request) | ||
.setStatus_3(status) | ||
.finish_3(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include <iostream> | ||
#include <sstream> | ||
#include <string> | ||
|
||
struct StringBuilder | ||
{ | ||
template <typename T> | ||
StringBuilder& append(const T& thing) | ||
{ | ||
ss << thing; | ||
return *this; | ||
} | ||
std::string build() | ||
{ | ||
return ss.str(); | ||
} | ||
std::stringstream ss; | ||
}; | ||
|
||
int main() | ||
{ | ||
std::string my_____String = StringBuilder().append(7).append(" + ").append(21).append(" = ").append(7 + 21).build(); | ||
std::string my_____String = StringBuilder() | ||
.append(7) | ||
.append(" + ") | ||
.append(21) | ||
.append(" = ") | ||
.append(7 + 21) | ||
.build(); | ||
|
||
std::cout << my___String << std::endl; | ||
} | ||
|
||
void function() | ||
{ | ||
auto response = ResponseBuilder_1(1) | ||
.setStatus_1(status) | ||
.finish_1(); | ||
|
||
ResponseBuilder_2(request) | ||
.setStatus_2(status) | ||
.finish_2(); | ||
|
||
return ResponseBuilder_3(request).setStatus_3(status).finish_3(); | ||
} |