Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kota-uchida committed Jun 11, 2015
1 parent c297055 commit 25c3383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion boots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ int main(int argc, char** argv)
cout << e.what() << endl;
return 1;
}
return 0;
return 0;
}

8 changes: 4 additions & 4 deletions show.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace
string s_;
size_t length_;

friend ostream& operator <<(ostream& os, FixedLength& f)
friend ostream& operator <<(ostream& os, const FixedLength& f)
{
os << f.s_;
for (size_t i = f.s_.length(); i < f.length_; ++i)
Expand All @@ -41,7 +41,7 @@ namespace
{
basic_string<uint8_t> s_;

friend ostream& operator <<(ostream& os, HexBytes& b)
friend ostream& operator <<(ostream& os, const HexBytes& b)
{
auto pat = format("%02x");
cout << pat % (int)b.s_[0];
Expand Down Expand Up @@ -137,7 +137,7 @@ void show(PbrFat& pbr)
cout << fixlen("BS_Reserved1:", 20) << pbr.fat12_16.BS_Reserved1 << endl;
cout << fixlen("BS_BootSig:", 20) << pbr.fat12_16.BS_BootSig << endl;
cout << fixlen("BS_VolID:", 20) << format("%08x") % pbr.fat12_16.BS_VolID << endl;
cout << fixlen("BS_FileSysType:", 20) << pbr.fat12_16.BS_FilSysType << endl;
cout << fixlen("BS_FilSysType:", 20) << fs_str_12_16 << endl;
}
else
{
Expand All @@ -154,6 +154,6 @@ void show(PbrFat& pbr)
cout << fixlen("BS_Reserved1:", 20) << pbr.fat32.BS_Reserved1 << endl;
cout << fixlen("BS_BootSig:", 20) << pbr.fat32.BS_BootSig << endl;
cout << fixlen("BS_VolID:", 20) << format("%08x") % pbr.fat32.BS_VolID << endl;
cout << fixlen("BS_FileSysType:", 20) << pbr.fat32.BS_FilSysType << endl;
cout << fixlen("BS_FilSysType:", 20) << fs_str_32 << endl;
}
}

0 comments on commit 25c3383

Please sign in to comment.