projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Working on g++ compatibility
[invirt/third/libt4.git]
/
rpc
/
file.h
diff --git
a/rpc/file.h
b/rpc/file.h
index
75c0d6e
..
393b98a
100644
(file)
--- a/
rpc/file.h
+++ b/
rpc/file.h
@@
-22,7
+22,7
@@
class file_t {
public:
inline file_t(int fd=-1) : fd_(fd) {}
inline file_t(const file_t &) = delete;
public:
inline file_t(int fd=-1) : fd_(fd) {}
inline file_t(const file_t &) = delete;
- inline file_t(file_t && other) : fd_(-1) { std::swap(fd_, other.fd_); }
+ inline file_t(file_t && other) : fd_(-1) { swap(fd_, other.fd_); }
inline ~file_t() { if (fd_ != -1) ::close(fd_); }
static inline void pipe(file_t *ends) {
int fds[2];
inline ~file_t() { if (fd_ != -1) ::close(fd_); }
static inline void pipe(file_t *ends) {
int fds[2];
@@
-31,7
+31,7
@@
class file_t {
ends[1].fd_ = fds[1];
}
inline operator int() const { if (fd_ == -1) throw "no fd"; return fd_; }
ends[1].fd_ = fds[1];
}
inline operator int() const { if (fd_ == -1) throw "no fd"; return fd_; }
- inline flags_t flags() const { return *this; }
+ inline flags_t flags() const { return {*this}; }
inline void close() {
::close(fd_);
fd_ = -1;
inline void close() {
::close(fd_);
fd_ = -1;