@@ -165,7 +165,7 @@ using env_vector_t = std::vector<env_char_t>;
165
165
namespace util
166
166
{
167
167
template <typename R>
168
- inline bool is_ready (std::shared_future<R> const &f)
168
+ bool is_ready (std::shared_future<R> const &f)
169
169
{
170
170
return f.wait_for (std::chrono::seconds (0 )) == std::future_status::ready;
171
171
}
@@ -405,7 +405,7 @@ namespace util
405
405
* to be split. Default constructed to ' '(space) and '\t'(tab)
406
406
* [out] vector<string> : Vector of strings split at deleimiter.
407
407
*/
408
- static inline std::vector<std::string>
408
+ inline std::vector<std::string>
409
409
split (const std::string& str, const std::string& delims=" \t " )
410
410
{
411
411
std::vector<std::string> res;
@@ -435,7 +435,7 @@ namespace util
435
435
* Default constructed to ' ' (space).
436
436
* [out] string: Joined string.
437
437
*/
438
- static inline
438
+ inline
439
439
std::string join (const std::vector<std::string>& vec,
440
440
const std::string& sep = " " )
441
441
{
@@ -456,7 +456,7 @@ namespace util
456
456
* [in] set : If 'true', set FD_CLOEXEC.
457
457
* If 'false' unset FD_CLOEXEC.
458
458
*/
459
- static inline
459
+ inline
460
460
void set_clo_on_exec (int fd, bool set = true )
461
461
{
462
462
int flags = fcntl (fd, F_GETFD, 0 );
@@ -476,7 +476,7 @@ namespace util
476
476
* First element of pair is the read descriptor of pipe.
477
477
* Second element is the write descriptor of pipe.
478
478
*/
479
- static inline
479
+ inline
480
480
std::pair<int , int > pipe_cloexec () noexcept (false )
481
481
{
482
482
int pipe_fds[2 ];
@@ -504,7 +504,7 @@ namespace util
504
504
* `buf` to `fd`.
505
505
* [out] int : Number of bytes written or -1 in case of failure.
506
506
*/
507
- static inline
507
+ inline
508
508
int write_n (int fd, const char * buf, size_t length)
509
509
{
510
510
size_t nwritten = 0 ;
@@ -531,7 +531,7 @@ namespace util
531
531
* will retry to read from `fd`, but only till the EINTR counter
532
532
* reaches 50 after which it will return with whatever data it read.
533
533
*/
534
- static inline
534
+ inline
535
535
int read_atmost_n (FILE* fp, char * buf, size_t read_upto)
536
536
{
537
537
#ifdef __USING_WINDOWS__
@@ -573,7 +573,7 @@ namespace util
573
573
* NOTE: `class Buffer` is a exposed public class. See below.
574
574
*/
575
575
576
- static inline int read_all (FILE* fp, std::vector<char >& buf)
576
+ inline int read_all (FILE* fp, std::vector<char >& buf)
577
577
{
578
578
auto buffer = buf.data ();
579
579
int total_bytes_read = 0 ;
@@ -621,7 +621,7 @@ namespace util
621
621
* NOTE: This is a blocking call as in, it will loop
622
622
* till the child is exited.
623
623
*/
624
- static inline
624
+ inline
625
625
std::pair<int , int > wait_for_child_exit (int pid)
626
626
{
627
627
int status = 0 ;
@@ -786,7 +786,7 @@ struct input
786
786
}
787
787
explicit input (IOTYPE typ) {
788
788
assert (typ == PIPE && " STDOUT/STDERR not allowed" );
789
- #ifndef __USING_WINDOWS__
789
+ #ifndef __USING_WINDOWS__
790
790
std::tie (rd_ch_, wr_ch_) = util::pipe_cloexec ();
791
791
#endif
792
792
}
@@ -1371,7 +1371,7 @@ inline void Popen::init_args() {
1371
1371
}
1372
1372
1373
1373
template <typename F, typename ... Args>
1374
- inline void Popen::init_args (F&& farg, Args&&... args)
1374
+ void Popen::init_args (F&& farg, Args&&... args)
1375
1375
{
1376
1376
detail::ArgumentDeducer argd (this );
1377
1377
argd.set_option (std::forward<F>(farg));
@@ -2006,13 +2006,13 @@ namespace detail
2006
2006
return Popen (std::forward<F>(farg), std::forward<Args>(args)...).wait ();
2007
2007
}
2008
2008
2009
- static inline void pipeline_impl (std::vector<Popen>& cmds)
2009
+ inline void pipeline_impl (std::vector<Popen>& cmds)
2010
2010
{
2011
2011
/* EMPTY IMPL */
2012
2012
}
2013
2013
2014
2014
template <typename ... Args>
2015
- static inline void pipeline_impl (std::vector<Popen>& cmds,
2015
+ void pipeline_impl (std::vector<Popen>& cmds,
2016
2016
const std::string& cmd,
2017
2017
Args&&... args)
2018
2018
{
0 commit comments