Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove const pointer cast #245

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/r.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,29 +218,29 @@ istream& R::read_att(istream& is) {
ostream& R::write_att(ostream& os) const {
switch(type()) {
case Type::RH:
return static_cast<const Rh* const>(this)->write_att(os);
return static_cast<const Rh*>(this)->write_att(os);
break;

case Type::R_8:
case Type::AL:
case Type::CL:
return static_cast<const R8* const>(this)->write_att(os);
return static_cast<const R8*>(this)->write_att(os);
break;

case Type::R_16:
case Type::AX:
case Type::DX:
return static_cast<const R16 * const>(this)->write_att(os);
return static_cast<const R16*>(this)->write_att(os);
break;

case Type::R_32:
case Type::EAX:
return static_cast<const R32 * const>(this)->write_att(os);
return static_cast<const R32*>(this)->write_att(os);
break;

case Type::R_64:
case Type::RAX:
return static_cast<const R64 * const>(this)->write_att(os);
return static_cast<const R64*>(this)->write_att(os);
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions src/sse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ ostream& Sse::write_att(ostream& os) const {
switch(type()) {
case Type::XMM_0:
case Type::XMM:
return static_cast<const Xmm * const>(this)->write_att(os);
return static_cast<const Xmm*>(this)->write_att(os);
break;

case Type::YMM:
return static_cast<const Ymm * const>(this)->write_att(os);
return static_cast<const Ymm*>(this)->write_att(os);
break;

default:
Expand Down