Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
[FIX] remove warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Dec 25, 2017
1 parent 65a1960 commit 7b25f4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion emulator_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void EmulatorBase::DumpRegisters(){
std::cout
<< "---- dump registers ----"
<< std::endl;
for(auto i=0;i<all_reg.size();i++){
for(size_t i=0;i<all_reg.size();i++){
if(all_reg[i] == nullptr)
throw "error";
std::cout
Expand Down
4 changes: 2 additions & 2 deletions font/font.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bool Font::LoadFile(const char *fname){

printf("font size: %dx%d\n", xsize, ysize);

int size = (xsize * ysize)/8;
size_t size = (xsize * ysize)/8;

char *tmp;
tmp = new char[size];
Expand All @@ -31,7 +31,7 @@ bool Font::LoadFile(const char *fname){
do {
if(fread(tmp, size, 1, fp) < 1) break;
if(data.size() < size*num) data.reserve(size*num);
for(auto i=0;i<(size);i++){
for(size_t i=0;i<(size);i++){
data[num*(size) + i] = tmp[i];
}
num++;
Expand Down
1 change: 1 addition & 0 deletions insn_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class InstructionBase {
//insn = std::vector<insnfunc_t>(0xff, (insnfunc_t)&InstructionBase::not_impl_insn);
}
//InstructionBase(EmulatorBase *e) : emu(e) {}
virtual ~InstructionBase(){}

//void SetEmu(EmulatorBase *emu){ this->emu=emu; }
void ClearInsn(size_t num){ insn.resize(num, (insnfunc_t)&InstructionBase::not_impl_insn); }
Expand Down

0 comments on commit 7b25f4d

Please sign in to comment.