diff options
author | 2019-12-17 00:51:14 +0100 | |
---|---|---|
committer | 2019-12-17 00:51:14 +0100 | |
commit | f047e4beaab1e2a31bd4a0992fa7a63b0ba0cf8c (patch) | |
tree | a208796e5c465cda24ad1c444e355ff2b1208602 | |
parent | d4257164fe4948297694961a26584f17d45d1505 (diff) | |
download | WarpX-f047e4beaab1e2a31bd4a0992fa7a63b0ba0cf8c.tar.gz WarpX-f047e4beaab1e2a31bd4a0992fa7a63b0ba0cf8c.tar.zst WarpX-f047e4beaab1e2a31bd4a0992fa7a63b0ba0cf8c.zip |
fixing bugs found by lgtm (II)
-rw-r--r-- | Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp index ffc4febae..d2efb877a 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp @@ -293,12 +293,12 @@ FromTXYEFileLaserProfile::read_data_t_chuck(int t_begin, int t_end) //Read data chunk std::ifstream inp(m_params.txye_file_name, std::ios::binary); if(!inp) Abort("Failed to open txye file"); - size_t skip_amount = 1 + + auto skip_amount = 1 + 3*sizeof(uint32_t) + m_params.t_coords.size()*sizeof(double) + m_params.x_coords.size()*sizeof(double) + m_params.y_coords.size()*sizeof(double) + - t_begin*m_params.nx*m_params.ny*sizeof(double); + sizeof(double)*t_begin*m_params.nx*m_params.ny; inp.ignore(skip_amount); if(!inp) Abort("Failed to read field data from txye file"); const int read_size = (i_last - i_first + 1)* |