Switch to std::copy

master
sigonasr2 1 year ago
parent f8814bec65
commit 6d806e12d0
  1. 10
      SHNFileDecryptor/SHNFileDecryptor.h

@ -145,14 +145,8 @@ void SHNFile::Decrypt(){
}
std::vector<std::byte>&SHNFile::ReadBytes(int bytes){
readArr.clear();
for(int i=0;i<bytes;i++){
if(marker<data.size()){
readArr.push_back(data[marker]);
marker++;
} else {
break;
}
}
std::copy(data.begin()+marker,data.begin()+marker+bytes,std::back_inserter(readArr));
marker+=bytes;
return readArr;
}
std::byte SHNFile::ReadByte(){

Loading…
Cancel
Save