Permalink
Browse files

rename nonsensical 'p' to 'encoder'

  • Loading branch information...
1 parent 41a8f79 commit afe8709b8f8ba41d0de62b3b5c1b56c3bf99c8bd @pkrumins committed Aug 18, 2010
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/fixed_png_stack.cpp
  2. +4 −4 src/png.cpp
View
8 src/fixed_png_stack.cpp
@@ -178,16 +178,16 @@ FixedPngStack::EIO_PngEncode(eio_req *req)
FixedPngStack *png = (FixedPngStack *)enc_req->png_obj;
try {
- PngEncoder p(png->data, png->width, png->height, png->buf_type);
- p.encode();
- enc_req->png_len = p.get_png_len();
+ PngEncoder encoder(png->data, png->width, png->height, png->buf_type);
+ encoder.encode();
+ enc_req->png_len =encoder.get_png_len();
enc_req->png = (char *)malloc(sizeof(*enc_req->png)*enc_req->png_len);
if (!enc_req->png) {
enc_req->error = strdup("malloc in FixedPngStack::EIO_PngEncode failed.");
return 0;
}
else {
- memcpy(enc_req->png, p.get_png(), enc_req->png_len);
+ memcpy(enc_req->png,encoder.get_png(), enc_req->png_len);
}
}
catch (const char *err) {
View
8 src/png.cpp
@@ -107,16 +107,16 @@ Png::EIO_PngEncode(eio_req *req)
Png *png = (Png *)enc_req->png_obj;
try {
- PngEncoder p((unsigned char *)png->data->data(), png->width, png->height, png->buf_type);
- p.encode();
- enc_req->png_len = p.get_png_len();
+ PngEncoder encoder((unsigned char *)png->data->data(), png->width, png->height, png->buf_type);
+ encoder.encode();
+ enc_req->png_len = encoder.get_png_len();
enc_req->png = (char *)malloc(sizeof(*enc_req->png)*enc_req->png_len);
if (!enc_req->png) {
enc_req->error = strdup("malloc in Png::EIO_PngEncode failed.");
return 0;
}
else {
- memcpy(enc_req->png, p.get_png(), enc_req->png_len);
+ memcpy(enc_req->png, encoder.get_png(), enc_req->png_len);
}
}
catch (const char *err) {

0 comments on commit afe8709

Please sign in to comment.