mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-07-17 01:12:55 +00:00
Use ofstream instead of ifstream where appropriate
This commit is contained in:
parent
43bf7a37fb
commit
6564e25b40
@ -513,11 +513,11 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
|
|||||||
{
|
{
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
|
||||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
|
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
|
||||||
}
|
}
|
||||||
catch (const std::ifstream::failure &e)
|
catch (const std::ofstream::failure &e)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||||
}
|
}
|
||||||
@ -872,7 +872,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
|||||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
catch (const std::ifstream::failure &e)
|
catch (const std::ofstream::failure &e)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user