Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 1cd8d6f

Browse files
committed
Minor updates
1 parent 9ba8246 commit 1cd8d6f

File tree

14 files changed

+35
-29
lines changed

14 files changed

+35
-29
lines changed

include/cppgit2/diff.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#include <cppgit2/ownership.hpp>
88
#include <cppgit2/signature.hpp>
99
#include <cppgit2/strarray.hpp>
10+
#include <functional>
1011
#include <git2.h>
1112
#include <string>
1213
#include <utility>
1314
#include <vector>
14-
#include <functional>
1515

1616
namespace cppgit2 {
1717

include/cppgit2/indexer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <cppgit2/odb.hpp>
44
#include <cppgit2/oid.hpp>
55
#include <cppgit2/ownership.hpp>
6-
#include <git2.h>
76
#include <functional>
7+
#include <git2.h>
88

99
namespace cppgit2 {
1010

include/cppgit2/libgit2_api.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class libgit2_api {
1717
int major, minor, revision;
1818
if (git_libgit2_version(&major, &minor, &revision))
1919
throw git_exception();
20-
return {major, minor, revision};
20+
return std::tuple<int, int, int>{major, minor, revision};
2121
}
2222
};
2323

include/cppgit2/odb.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#include <cppgit2/object.hpp>
66
#include <cppgit2/oid.hpp>
77
#include <cppgit2/ownership.hpp>
8+
#include <functional>
89
#include <git2.h>
910
#include <tuple>
1011
#include <utility>
1112
#include <vector>
12-
#include <functional>
1313

1414
namespace cppgit2 {
1515

include/cppgit2/patch.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#include <cppgit2/diff.hpp>
44
#include <cppgit2/libgit2_api.hpp>
55
#include <cppgit2/ownership.hpp>
6+
#include <functional>
67
#include <git2.h>
78
#include <string>
89
#include <tuple>
9-
#include <functional>
1010

1111
namespace cppgit2 {
1212

include/cppgit2/remote.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ class remote : public libgit2_api {
149149
const fetch::options &options = fetch::options());
150150

151151
// Download new data and update tips
152-
void fetch_data(const strarray &refspecs, const std::string &reflog_message,
153-
const cppgit2::fetch::options &options = cppgit2::fetch::options());
152+
void fetch_data(
153+
const strarray &refspecs, const std::string &reflog_message,
154+
const cppgit2::fetch::options &options = cppgit2::fetch::options());
154155

155156
// Get the remote's list of fetch refspecs
156157
// The memory is owned by the user and should be freed

include/cppgit2/repository.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
#include <cppgit2/tag.hpp>
3838
#include <cppgit2/tree_builder.hpp>
3939
#include <cppgit2/worktree.hpp>
40+
#include <functional>
4041
#include <git2.h>
4142
#include <string>
4243
#include <utility>
43-
#include <functional>
4444

4545
namespace cppgit2 {
4646

include/cppgit2/revwalk.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <cppgit2/libgit2_api.hpp>
44
#include <cppgit2/oid.hpp>
55
#include <cppgit2/ownership.hpp>
6-
#include <git2.h>
76
#include <functional>
7+
#include <git2.h>
88

99
namespace cppgit2 {
1010

include/cppgit2/tree_builder.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <functional>
99
#include <git2.h>
1010
#include <string>
11-
#include <functional>
1211

1312
namespace cppgit2 {
1413

src/odb.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ odb::read_header(const oid &id) const {
132132
git_object_t object_type_out;
133133
if (git_odb_read_header(&length_out, &object_type_out, c_ptr_, id.c_ptr()))
134134
throw git_exception();
135-
return {length_out,
136-
static_cast<cppgit2::object::object_type>(object_type_out)};
135+
return std::pair<size_t, cppgit2::object::object_type>{
136+
length_out, static_cast<cppgit2::object::object_type>(object_type_out)};
137137
}
138138

139139
odb::object odb::read_prefix(const oid &id, size_t length) const {
@@ -164,7 +164,8 @@ odb::open_rstream(const oid &id) {
164164
git_object_t type;
165165
if (git_odb_open_rstream(&result.c_ptr_, &length, &type, c_ptr_, id.c_ptr()))
166166
throw git_exception();
167-
return {result, length, static_cast<cppgit2::object::object_type>(type)};
167+
return std::tuple<odb::stream, size_t, cppgit2::object::object_type>{
168+
result, length, static_cast<cppgit2::object::object_type>(type)};
168169
}
169170

170171
odb::stream odb::open_wstream(cppgit2::object::object_size size,

0 commit comments

Comments
 (0)