From d933699b4dd106c227f8d07a2471d5f39f1c82af Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 3 Nov 2016 00:49:14 +0300 Subject: Adopt to auto_fd introduced to libbutl fdstreams and process --- build2/cc/compile.cxx | 5 +++-- build2/cc/gcc.cxx | 3 ++- build2/cc/link.cxx | 5 +++-- build2/cc/msvc.cxx | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'build2/cc') diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index e180798..45a0aff 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -1190,7 +1190,7 @@ namespace build2 // complains, loudly (broken pipe). So now we are going to skip // until the end. // - ifdstream is (cid == "msvc" ? pr.in_efd : pr.in_ofd, + ifdstream is (move (cid == "msvc" ? pr.in_efd : pr.in_ofd), fdstream_mode::text | fdstream_mode::skip, ifdstream::badbit); @@ -1565,7 +1565,8 @@ namespace build2 { try { - ifdstream is (pr.in_ofd, fdstream_mode::text, ifdstream::badbit); + ifdstream is ( + move (pr.in_ofd), fdstream_mode::text, ifdstream::badbit); msvc_filter_cl (is, rels); diff --git a/build2/cc/gcc.cxx b/build2/cc/gcc.cxx index a5c8357..b4ec45c 100644 --- a/build2/cc/gcc.cxx +++ b/build2/cc/gcc.cxx @@ -54,7 +54,8 @@ namespace build2 try { - ifdstream is (pr.in_ofd, fdstream_mode::skip, ifdstream::badbit); + ifdstream is ( + move (pr.in_ofd), fdstream_mode::skip, ifdstream::badbit); // The output of -print-search-dirs are a bunch of lines that start // with ": =" where name can be "install", "programs", or diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index 7722c4f..cf284e1 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -947,7 +947,7 @@ namespace build2 try { - ofdstream os (pr.out_fd); + ofdstream os (move (pr.out_fd)); // 1 is resource ID, 24 is RT_MANIFEST. We also need to escape // Windows path backslashes. @@ -1475,7 +1475,8 @@ namespace build2 { try { - ifdstream is (pr.in_ofd, fdstream_mode::text, ifdstream::badbit); + ifdstream is ( + move (pr.in_ofd), fdstream_mode::text, ifdstream::badbit); msvc_filter_link (is, t, lt); diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx index 5261072..81736c9 100644 --- a/build2/cc/msvc.cxx +++ b/build2/cc/msvc.cxx @@ -144,7 +144,8 @@ namespace build2 try { - ifdstream is (pr.in_ofd, fdstream_mode::skip, ifdstream::badbit); + ifdstream is ( + move (pr.in_ofd), fdstream_mode::skip, ifdstream::badbit); while (getline (is, s)) { -- cgit v1.1