Format the code using clang-format

This commit is contained in:
Victor Zverovich
2019-01-12 18:27:38 -08:00
parent 9a777b9e1c
commit 58b6f8db48
39 changed files with 4734 additions and 5108 deletions
+4 -5
View File
@@ -8,7 +8,7 @@
#include "util.h"
#include <cstring>
void increment(char *s) {
void increment(char* s) {
for (int i = static_cast<int>(std::strlen(s)) - 1; i >= 0; --i) {
if (s[i] != '9') {
++s[i];
@@ -30,15 +30,14 @@ std::string get_system_error(int error_code) {
#endif
}
const char *const FILE_CONTENT = "Don't panic!";
const char* const FILE_CONTENT = "Don't panic!";
fmt::buffered_file open_buffered_file(FILE **fp) {
fmt::buffered_file open_buffered_file(FILE** fp) {
fmt::file read_end, write_end;
fmt::file::pipe(read_end, write_end);
write_end.write(FILE_CONTENT, std::strlen(FILE_CONTENT));
write_end.close();
fmt::buffered_file f = read_end.fdopen("r");
if (fp)
*fp = f.get();
if (fp) *fp = f.get();
return f;
}