Update to properly generate template definitions.

master
sigonasr2 1 year ago
parent 0f65775b13
commit d2441cf024
  1. 8
      SHNFileDecryptor/SHNFileDecryptor.h

@ -102,7 +102,9 @@ public:
int Cols(); int Cols();
//const SHNFile::Data Get(int row,int col)const; //const SHNFile::Data Get(int row,int col)const;
template<typename T> template<typename T>
const T Get(int row,int col)const; const T Get(int row,int col)const{
return *(std::static_pointer_cast<T>(contents[row][col].data));
};
SHNFile(); SHNFile();
SHNFile(SHNFile&&)noexcept; SHNFile(SHNFile&&)noexcept;
~SHNFile(); ~SHNFile();
@ -533,10 +535,6 @@ void SHNFile::Save(){
WriteBytes(encryptedFile,data,readAmt-0x24); WriteBytes(encryptedFile,data,readAmt-0x24);
std::cout<<"File "<<filename<<" Saved!"<<std::endl; std::cout<<"File "<<filename<<" Saved!"<<std::endl;
} }
template<typename T>
const T SHNFile::Get(int row,int col)const{
return *(std::static_pointer_cast<T>(contents[row][col].data));
};
void SHNFile::Write(int row,int col,std::byte val){ void SHNFile::Write(int row,int col,std::byte val){
contents[row][col].Set<std::byte>(val); contents[row][col].Set<std::byte>(val);
} }

Loading…
Cancel
Save