]> git.tdb.fi Git - builder.git/blobdiff - source/config.cpp
Use IO::BufferedFile where appropriate
[builder.git] / source / config.cpp
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);