Skip to content

Commit

Permalink
Move READ_FD and WRITE_FD to constrexpr static class members
Browse files Browse the repository at this point in the history
  • Loading branch information
tilsche committed Jul 25, 2018
1 parent 1e69fde commit f1bec35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions include/lo2s/pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class Pipe
void close_write_fd();

private:
constexpr static int READ_FD = 0;
constexpr static int WRITE_FD = 1;

void fd_flags(std::size_t fd, int flags);
void close_fd(std::size_t fd);

Expand Down
3 changes: 0 additions & 3 deletions src/pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ extern "C" {
namespace lo2s
{

constexpr int READ_FD = 0;
constexpr int WRITE_FD = 1;

Pipe::Pipe()
{
int res = ::pipe(fds_);
Expand Down

0 comments on commit f1bec35

Please sign in to comment.