]> git.tdb.fi Git - builder.git/commitdiff
Use IO::BufferedFile where appropriate
authorMikko Rasa <tdb@tdb.fi>
Sat, 16 Aug 2008 10:17:48 +0000 (10:17 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sat, 16 Aug 2008 10:17:48 +0000 (10:17 +0000)
source/builder.cpp
source/config.cpp

index bb7b68ff01f444f86ff747423d109ce30a8975ad..9be7f6c8eec3cbf57c5dc67d9556ec7a5c8c68a2 100644 (file)
@@ -547,8 +547,7 @@ int Builder::load_build_file(const FS::Path &fn)
 {
        try
        {
-               IO::File inf(fn.str());
-               IO::Buffered in(inf);
+               IO::BufferedFile in(fn.str());
 
                if(verbose>=3)
                        cout<<"Reading "<<fn<<'\n';
index a83a641a5bcaa66dbfcf2eda1ee477ab13648306..9ade53032d7481ac8bfbdccedf8e897e2c49e990 100644 (file)
@@ -66,7 +66,7 @@ void Config::select_last_profile()
 {
        try
        {
-               IO::File in((package.get_source()/".profile").str());
+               IO::BufferedFile in((package.get_source()/".profile").str());
                string profile;
                in.getline(profile);
                set_option("profile", profile);
@@ -91,7 +91,7 @@ void Config::select_profile(const string &profile)
 
        if(!package.get_builder().get_dry_run())
        {
-               IO::File out((package.get_source()/".profile").str(), IO::M_WRITE);
+               IO::BufferedFile out((package.get_source()/".profile").str(), IO::M_WRITE);
                IO::print(out, "%s\n", profile);
        }
 
@@ -184,7 +184,7 @@ void Config::save() const
        if(i!=options.end())
                fn=package.get_source()/(".options."+i->second.value+".cache");
 
-       IO::File out(fn.str(), IO::M_WRITE);
+       IO::BufferedFile out(fn.str(), IO::M_WRITE);
 
        for(i=options.begin(); i!=options.end(); ++i)
                IO::print(out, "option \"%s\" \"%s\";\n", i->second.name, i->second.value);
@@ -211,8 +211,7 @@ void Config::load()
 
        try
        {
-               IO::File inf(fn.str());
-               IO::Buffered in(inf);
+               IO::BufferedFile in(fn.str());
 
                mtime=Time::TimeStamp::from_unixtime(FS::stat(fn).st_mtime);