Skip to content

Commit

Permalink
Changes to match code style for new file loading code
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstark committed Jan 23, 2021
1 parent 628219a commit 8984824
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions AudioFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,21 +460,21 @@ bool AudioFile<T>::load (std::string filePath)

std::vector<uint8_t> fileData;

file.unsetf(std::ios::skipws);
file.unsetf (std::ios::skipws);

file.seekg(0, std::ios::end);
file.seekg (0, std::ios::end);
size_t length = file.tellg();
file.seekg(0, std::ios::beg);
file.seekg (0, std::ios::beg);

// allocate
fileData.resize(length);
fileData.resize (length);

file.read(reinterpret_cast<char*>(fileData.data()), length);
file.read(reinterpret_cast<char*> (fileData.data()), length);
file.close();

if (file.gcount() != length)
{
reportError("ERROR: Couldn't read entire file\n" + filePath);
reportError ("ERROR: Couldn't read entire file\n" + filePath);
return false;
}

Expand Down

0 comments on commit 8984824

Please sign in to comment.