mirror of https://github.com/GNOME/gimp.git
libgimpbase/gimpchecks.c libgimp/gimpunitcache.c
2008-01-06 Sven Neumann <sven@gimp.org> * libgimpbase/gimpchecks.c * libgimp/gimpunitcache.c * libgimpwidgets/gimppageselector.c * libgimpwidgets/gimpcolorscales.c: removed redundant checks for enum values (which are unsigned) >= 0. svn path=/trunk/; revision=24546
This commit is contained in:
parent
a01a055c01
commit
c30c5f60a3
|
@ -1,3 +1,11 @@
|
|||
2008-01-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpbase/gimpchecks.c
|
||||
* libgimp/gimpunitcache.c
|
||||
* libgimpwidgets/gimppageselector.c
|
||||
* libgimpwidgets/gimpcolorscales.c: removed redundant checks for
|
||||
enum values (which are unsigned) >= 0.
|
||||
|
||||
2008-01-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/convmatrix.c (convolve_image): fixed out-of-bounds
|
||||
|
|
|
@ -133,8 +133,6 @@ _gimp_unit_cache_new (gchar *identifier,
|
|||
gboolean
|
||||
_gimp_unit_cache_get_deletion_flag (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, TRUE);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return FALSE;
|
||||
|
||||
|
@ -145,8 +143,6 @@ void
|
|||
_gimp_unit_cache_set_deletion_flag (GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
{
|
||||
g_return_if_fail (unit >= GIMP_UNIT_PIXEL);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return;
|
||||
|
||||
|
@ -185,8 +181,6 @@ _gimp_unit_cache_get_digits (GimpUnit unit)
|
|||
const gchar *
|
||||
_gimp_unit_cache_get_identifier (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, NULL);
|
||||
|
||||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.identifier;
|
||||
|
||||
|
@ -199,8 +193,6 @@ _gimp_unit_cache_get_identifier (GimpUnit unit)
|
|||
const gchar *
|
||||
_gimp_unit_cache_get_symbol (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, NULL);
|
||||
|
||||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.symbol;
|
||||
|
||||
|
@ -213,8 +205,6 @@ _gimp_unit_cache_get_symbol (GimpUnit unit)
|
|||
const gchar *
|
||||
_gimp_unit_cache_get_abbreviation (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, NULL);
|
||||
|
||||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.abbreviation;
|
||||
|
||||
|
@ -227,8 +217,6 @@ _gimp_unit_cache_get_abbreviation (GimpUnit unit)
|
|||
const gchar *
|
||||
_gimp_unit_cache_get_singular (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, NULL);
|
||||
|
||||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.singular);
|
||||
|
||||
|
@ -241,8 +229,6 @@ _gimp_unit_cache_get_singular (GimpUnit unit)
|
|||
const gchar *
|
||||
_gimp_unit_cache_get_plural (GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, NULL);
|
||||
|
||||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.plural);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ gimp_checks_get_shades (GimpCheckType type,
|
|||
{ 0, 0 } /* BLACK_ONLY */
|
||||
};
|
||||
|
||||
type = CLAMP (type, 0, 5);
|
||||
type = MIN (type, 5);
|
||||
|
||||
if (light)
|
||||
*light = shades[type][1];
|
||||
|
|
|
@ -267,7 +267,7 @@ gimp_color_scales_set_channel (GimpColorSelector *selector,
|
|||
{
|
||||
GimpColorScales *scales = GIMP_COLOR_SCALES (selector);
|
||||
|
||||
if (channel >= 0 && channel < 7)
|
||||
if (channel < 7)
|
||||
{
|
||||
g_signal_handlers_block_by_func (scales->toggles[channel],
|
||||
gimp_color_scales_toggle_update,
|
||||
|
|
|
@ -559,8 +559,7 @@ gimp_page_selector_set_target (GimpPageSelector *selector,
|
|||
GimpPageSelectorPrivate *priv;
|
||||
|
||||
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
|
||||
g_return_if_fail (target >= GIMP_PAGE_SELECTOR_TARGET_LAYERS &&
|
||||
target <= GIMP_PAGE_SELECTOR_TARGET_IMAGES);
|
||||
g_return_if_fail (target <= GIMP_PAGE_SELECTOR_TARGET_IMAGES);
|
||||
|
||||
priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
|
||||
|
||||
|
|
Loading…
Reference in New Issue