aboutsummaryrefslogtreecommitdiff
path: root/graphics
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
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')
-rw-r--r--graphics/VectorRendererSpec.cpp2
-rw-r--r--graphics/surface.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 5897d2edd2..8bc7b5c164 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -169,7 +169,7 @@ namespace Graphics {
/**
* Fills several pixels in a row with a given color.
*
- * This is a replacement function for Common::set_to, using an unrolled
+ * This is a replacement function for Common::fill, using an unrolled
* loop to maximize performance on most architectures.
* This function may (and should) be overloaded in any child renderers
* for portable platforms with platform-specific assembly code.
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;
}
}