Skip to content

Commit bf8d642

Browse files
committed
chore: remove superfluous inline and static
1 parent 1392c47 commit bf8d642

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

subprocess.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ using env_vector_t = std::vector<env_char_t>;
165165
namespace util
166166
{
167167
template <typename R>
168-
inline bool is_ready(std::shared_future<R> const &f)
168+
bool is_ready(std::shared_future<R> const &f)
169169
{
170170
return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready;
171171
}
@@ -405,7 +405,7 @@ namespace util
405405
* to be split. Default constructed to ' '(space) and '\t'(tab)
406406
* [out] vector<string> : Vector of strings split at deleimiter.
407407
*/
408-
static inline std::vector<std::string>
408+
inline std::vector<std::string>
409409
split(const std::string& str, const std::string& delims=" \t")
410410
{
411411
std::vector<std::string> res;
@@ -435,7 +435,7 @@ namespace util
435435
* Default constructed to ' ' (space).
436436
* [out] string: Joined string.
437437
*/
438-
static inline
438+
inline
439439
std::string join(const std::vector<std::string>& vec,
440440
const std::string& sep = " ")
441441
{
@@ -456,7 +456,7 @@ namespace util
456456
* [in] set : If 'true', set FD_CLOEXEC.
457457
* If 'false' unset FD_CLOEXEC.
458458
*/
459-
static inline
459+
inline
460460
void set_clo_on_exec(int fd, bool set = true)
461461
{
462462
int flags = fcntl(fd, F_GETFD, 0);
@@ -476,7 +476,7 @@ namespace util
476476
* First element of pair is the read descriptor of pipe.
477477
* Second element is the write descriptor of pipe.
478478
*/
479-
static inline
479+
inline
480480
std::pair<int, int> pipe_cloexec() noexcept(false)
481481
{
482482
int pipe_fds[2];
@@ -504,7 +504,7 @@ namespace util
504504
* `buf` to `fd`.
505505
* [out] int : Number of bytes written or -1 in case of failure.
506506
*/
507-
static inline
507+
inline
508508
int write_n(int fd, const char* buf, size_t length)
509509
{
510510
size_t nwritten = 0;
@@ -531,7 +531,7 @@ namespace util
531531
* will retry to read from `fd`, but only till the EINTR counter
532532
* reaches 50 after which it will return with whatever data it read.
533533
*/
534-
static inline
534+
inline
535535
int read_atmost_n(FILE* fp, char* buf, size_t read_upto)
536536
{
537537
#ifdef __USING_WINDOWS__
@@ -573,7 +573,7 @@ namespace util
573573
* NOTE: `class Buffer` is a exposed public class. See below.
574574
*/
575575

576-
static inline int read_all(FILE* fp, std::vector<char>& buf)
576+
inline int read_all(FILE* fp, std::vector<char>& buf)
577577
{
578578
auto buffer = buf.data();
579579
int total_bytes_read = 0;
@@ -621,7 +621,7 @@ namespace util
621621
* NOTE: This is a blocking call as in, it will loop
622622
* till the child is exited.
623623
*/
624-
static inline
624+
inline
625625
std::pair<int, int> wait_for_child_exit(int pid)
626626
{
627627
int status = 0;
@@ -786,7 +786,7 @@ struct input
786786
}
787787
explicit input(IOTYPE typ) {
788788
assert (typ == PIPE && "STDOUT/STDERR not allowed");
789-
#ifndef __USING_WINDOWS__
789+
#ifndef __USING_WINDOWS__
790790
std::tie(rd_ch_, wr_ch_) = util::pipe_cloexec();
791791
#endif
792792
}
@@ -1371,7 +1371,7 @@ inline void Popen::init_args() {
13711371
}
13721372

13731373
template <typename F, typename... Args>
1374-
inline void Popen::init_args(F&& farg, Args&&... args)
1374+
void Popen::init_args(F&& farg, Args&&... args)
13751375
{
13761376
detail::ArgumentDeducer argd(this);
13771377
argd.set_option(std::forward<F>(farg));
@@ -2006,13 +2006,13 @@ namespace detail
20062006
return Popen(std::forward<F>(farg), std::forward<Args>(args)...).wait();
20072007
}
20082008

2009-
static inline void pipeline_impl(std::vector<Popen>& cmds)
2009+
inline void pipeline_impl(std::vector<Popen>& cmds)
20102010
{
20112011
/* EMPTY IMPL */
20122012
}
20132013

20142014
template<typename... Args>
2015-
static inline void pipeline_impl(std::vector<Popen>& cmds,
2015+
void pipeline_impl(std::vector<Popen>& cmds,
20162016
const std::string& cmd,
20172017
Args&&... args)
20182018
{

0 commit comments

Comments
 (0)