[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/image_filters.cpp serve...
From: |
Markus Gothe |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/image_filters.cpp serve... |
Date: |
Sun, 08 Oct 2006 16:11:37 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 06/10/08 16:11:37
Modified files:
. : ChangeLog
libbase : image_filters.cpp
server : edit_text_character.cpp fontlib.cpp
Log message:
static_cast<int>() + C++-mem-handling.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1074&r2=1.1075
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/image_filters.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/server/fontlib.cpp?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1074
retrieving revision 1.1075
diff -u -b -r1.1074 -r1.1075
--- ChangeLog 8 Oct 2006 15:56:05 -0000 1.1074
+++ ChangeLog 8 Oct 2006 16:11:37 -0000 1.1075
@@ -8,7 +8,9 @@
* backend/render_handler_agg.cpp: added id-tag, static_cast to int16*.
* backend/render_handler_tri.h: added id-tag.
* backend/render_handler.h: added virtual desctror and id-tag.
- * server/asobj/string.cpp: static_cast<int>().
+ * server/asobj/string.cpp, server/fontlib.cpp: static_cast<int>().
+ * server/edit_text_character.cpp: static_cast<uint16_t>().
+ * libbase/image_filters.cpp: static_cast<int>() + C++-mem-handling.
2006-10-07 Bastiaan Jacques <address@hidden>
Index: libbase/image_filters.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/image_filters.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- libbase/image_filters.cpp 29 Aug 2006 16:02:13 -0000 1.12
+++ libbase/image_filters.cpp 8 Oct 2006 16:11:37 -0000 1.13
@@ -11,6 +11,7 @@
// converted from K&R C to C-like C++, changed the interfaces a bit,
// etc.
+/* $Id: image_filters.cpp,v 1.13 2006/10/08 16:11:37 nihilus Exp $ */
#include "image.h"
#include "utility.h"
@@ -723,12 +724,12 @@
/* For interpolation: assume source dimension is one pixel */
/* smaller to avoid overflow on right and bottom edge. */
- int sx = (int) (65536.0 * (float) (src->m_width - 1) / (float)
dst->m_width);
- int sy = (int) (65536.0 * (float) (src->m_height - 1) / (float)
dst->m_height);
+ int sx = static_cast<int>((65536.0 * (float) (src->m_width - 1) / (float)
dst->m_width));
+ int sy = static_cast<int>((65536.0 * (float) (src->m_height - 1) / (float)
dst->m_height));
/* Allocate memory for row increments */
- int *sax = (int*) malloc ((dst->m_width + 1) * sizeof (uint32_t));
- int *say = (int*) malloc ((dst->m_height + 1) * sizeof (uint32_t));
+ int *sax = new int[(dst->m_width + 1)];
+ int *say = new int[(dst->m_height + 1)];
/* Precalculate row increments */
int csx = 0;
@@ -806,8 +807,8 @@
}
/* Remove temp arrays */
- free (sax);
- free (say);
+ delete[] sax;
+ delete[] say;
}
Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/edit_text_character.cpp 7 Oct 2006 15:08:26 -0000 1.16
+++ server/edit_text_character.cpp 8 Oct 2006 16:11:37 -0000 1.17
@@ -3,6 +3,8 @@
// This source code has been donated to the Public Domain. Do
// whatever you want with it.
+/* $Id: edit_text_character.cpp,v 1.17 2006/10/08 16:11:37 nihilus Exp $ */
+
#include "utf8.h"
#include "log.h"
#include "render.h"
@@ -65,8 +67,8 @@
void edit_text_character::show_cursor()
{
- uint16_t x = (int) m_xcursor;
- uint16_t y = (int) m_ycursor;
+ uint16_t x = static_cast<uint16_t>(m_xcursor);
+ uint16_t y = static_cast<uint16_t>(m_ycursor);
uint16_t h = m_def->get_font_height();
int16_t box[4];
@@ -615,7 +617,7 @@
//uint16_t code = m_text[j];
x += _font->get_kerning_adjustment(last_code, (int) code) *
scale;
- last_code = (int) code;
+ last_code = static_cast<int>(code);
// Expand the bounding-box to the lower-right corner of each
glyph as
// we generate it.
@@ -794,7 +796,7 @@
float extra_space = align_line(m_def->get_alignment(),
last_line_start_record, x);
- m_xcursor += (int) extra_space;
+ m_xcursor += static_cast<int>(extra_space);
m_ycursor -= m_def->get_font_height() + (_font->get_leading() -
_font->get_descent()) * scale;
}
Index: server/fontlib.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/fontlib.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- server/fontlib.cpp 2 Oct 2006 16:28:11 -0000 1.22
+++ server/fontlib.cpp 8 Oct 2006 16:11:37 -0000 1.23
@@ -5,7 +5,7 @@
// A module to take care of all of gnash's loaded fonts.
-/* $Id: fontlib.cpp,v 1.22 2006/10/02 16:28:11 bjacques Exp $ */
+/* $Id: fontlib.cpp,v 1.23 2006/10/08 16:11:37 nihilus Exp $ */
#include "container.h"
#include "tu_file.h"
@@ -464,8 +464,8 @@
{
assert(s_render_buffer);
- int iy0 = (int) ceilf(y0);
- int iy1 = (int) ceilf(y1);
+ int iy0 = static_cast<int>(ceilf(y0));
+ int iy1 = static_cast<int>(ceilf(y1));
float dy = y1 - y0;
for (int y = iy0; y < iy1; y++)
@@ -474,8 +474,8 @@
if (y >= s_glyph_render_size) return;
float f = (y - y0) / dy;
- int xl = (int) ceilf(flerp(xl0, xl1, f));
- int xr = (int) ceilf(flerp(xr0, xr1, f));
+ int xl = static_cast<int>(ceilf(flerp(xl0, xl1,
f)));
+ int xr = static_cast<int>(ceilf(flerp(xr0, xr1,
f)));
xl = iclamp(xl, 0, s_glyph_render_size - 1);
xr = iclamp(xr, 0, s_glyph_render_size - 1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/image_filters.cpp serve...,
Markus Gothe <=