aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-11-16 18:06:30 +0100
committerJohannes Schickel2011-11-16 18:06:30 +0100
commit61795739f8f45c5de4cfd0fe57af459146c5173c (patch)
tree5ff6bcde25f40545d1768f623804ba44afce4b6e /graphics/surface.cpp
parent6e90f9e6938c9727a3dbb552b74f0d40d0ab221f (diff)
downloadscummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.tar.gz
scummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.tar.bz2
scummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.zip
COMMON: Rename Common::set_to to Common::fill.
This makes the name match with the name of the STL function with the same behavior.
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r--graphics/surface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index e0b25f22e9..79a7821feb 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -95,10 +95,10 @@ void Surface::hLine(int x, int y, int x2, uint32 color) {
memset(ptr, (byte)color, x2 - x + 1);
} else if (format.bytesPerPixel == 2) {
uint16 *ptr = (uint16 *)getBasePtr(x, y);
- Common::set_to(ptr, ptr + (x2 - x + 1), (uint16)color);
+ Common::fill(ptr, ptr + (x2 - x + 1), (uint16)color);
} else if (format.bytesPerPixel == 4) {
uint32 *ptr = (uint32 *)getBasePtr(x, y);
- Common::set_to(ptr, ptr + (x2 - x + 1), color);
+ Common::fill(ptr, ptr + (x2 - x + 1), color);
} else {
error("Surface::hLine: bytesPerPixel must be 1, 2, or 4");
}
@@ -172,13 +172,13 @@ void Surface::fillRect(Common::Rect r, uint32 color) {
if (format.bytesPerPixel == 2) {
uint16 *ptr = (uint16 *)getBasePtr(r.left, r.top);
while (height--) {
- Common::set_to(ptr, ptr + width, (uint16)color);
+ Common::fill(ptr, ptr + width, (uint16)color);
ptr += pitch / 2;
}
} else {
uint32 *ptr = (uint32 *)getBasePtr(r.left, r.top);
while (height--) {
- Common::set_to(ptr, ptr + width, color);
+ Common::fill(ptr, ptr + width, color);
ptr += pitch / 4;
}
}