This repository was archived by the owner on Jan 19, 2021. It is now read-only.
File tree 5 files changed +23
-27
lines changed
5 files changed +23
-27
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,10 @@ PenaltyBreakString: 1000
90
90
PenaltyExcessCharacter : 1000000
91
91
PenaltyReturnTypeOnItsOwnLine : 60
92
92
PointerAlignment : Right
93
- RawStringFormats :
94
- - Language : TextProto
95
- Delimiters :
96
- - ' pb'
97
- - ' proto'
98
- BasedOnStyle : google
93
+ RawStringFormats :
94
+ - Delimiter : pb
95
+ Language : TextProto
96
+ BasedOnStyle : google
99
97
ReflowComments : true
100
98
SortIncludes : true
101
99
SortUsingDeclarations : true
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ find ./include ./src ./samples -type f \( -iname \* .cpp -o -iname \* .hpp \) | xargs clang-format -style=file -i
Original file line number Diff line number Diff line change 5
5
6
6
namespace cppgit2 {
7
7
8
- class exception : public std ::exception {
9
- public:
10
- exception () {
11
- auto error = git_error_last ();
12
- message_ = error ? error->message : " unknown error" ;
13
- }
14
- exception (const char * message) : message_(message) {}
15
- exception (const std::string & message) : message_(message) {}
16
- virtual ~exception () throw () {}
17
- virtual const char * what () const throw() {
18
- return message_.c_str ();
19
- }
8
+ class exception : public std ::exception {
9
+ public:
10
+ exception () {
11
+ auto error = git_error_last ();
12
+ message_ = error ? error->message : " unknown error" ;
13
+ }
14
+ exception (const char *message) : message_(message) {}
15
+ exception (const std::string &message) : message_(message) {}
16
+ virtual ~exception () throw () {}
17
+ virtual const char *what () const throw() { return message_.c_str (); }
20
18
21
- protected:
22
- std::string message_;
23
- };
24
-
25
- }
19
+ protected:
20
+ std::string message_;
21
+ };
22
+
23
+ } // namespace cppgit2
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < cppgit2/exception.hpp>
2
3
#include < git2.h>
3
4
#include < string>
4
- #include < cppgit2/exception.hpp>
5
5
6
6
namespace cppgit2 {
7
7
Original file line number Diff line number Diff line change 2
2
3
3
using namespace cppgit2 ;
4
4
5
- oid::oid () {
6
- git_libgit2_init ();
7
- }
5
+ oid::oid () { git_libgit2_init (); }
8
6
9
7
oid::oid (const std::string &hex_string) {
10
8
git_libgit2_init ();
You can’t perform that action at this time.
0 commit comments