Constify some static arrays everywhere

This commit is contained in:
Sebastian Dröge 2015-01-21 09:49:47 +01:00
parent 69e338d7dd
commit 2bd4ea6e8e
6 changed files with 12 additions and 12 deletions

View file

@ -30,7 +30,7 @@ G_BEGIN_DECLS
/* on OSX the cdparanoia headers include IOKit framework headers (in particular
* SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member
* named VERSION, so we must #undef VERSION here for things to compile on OSX */
static char GST_PLUGINS_BASE_VERSION[] = VERSION;
static const char GST_PLUGINS_BASE_VERSION[] = VERSION;
#undef VERSION
#ifdef CDPARANOIA_HEADERS_IN_DIR

View file

@ -2711,7 +2711,7 @@ typedef struct
#define MAKE_GRAY_LE_FORMAT(name, desc, depth, pstride, plane, offs, sub, pack) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
static VideoFormat formats[] = {
static const VideoFormat formats[] = {
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", "unknown video", 0, DPTH0,
PSTR0, PLANE_NA, OFFS0}},
{0x00000000, {GST_VIDEO_FORMAT_ENCODED, "ENCODED", "encoded video",

View file

@ -469,7 +469,7 @@ MAKE_PACK_FUNC_ORC_FI_S (s32_be_float, 4, WRITE32_TO_BE);
#define audio_convert_pack_double_hq_le MAKE_UNPACK_FUNC_NAME (double_hq_le)
#define audio_convert_pack_double_hq_be MAKE_UNPACK_FUNC_NAME (double_hq_be)
static AudioConvertUnpack unpack_funcs[] = {
static const AudioConvertUnpack unpack_funcs[] = {
(AudioConvertUnpack) MAKE_UNPACK_FUNC_NAME (u8),
(AudioConvertUnpack) MAKE_UNPACK_FUNC_NAME (s8),
(AudioConvertUnpack) MAKE_UNPACK_FUNC_NAME (u8),
@ -512,7 +512,7 @@ static AudioConvertUnpack unpack_funcs[] = {
(AudioConvertUnpack) MAKE_UNPACK_FUNC_NAME (s32_be_float),
};
static AudioConvertPack pack_funcs[] = {
static const AudioConvertPack pack_funcs[] = {
(AudioConvertPack) MAKE_PACK_FUNC_NAME (u8),
(AudioConvertPack) MAKE_PACK_FUNC_NAME (s8),
(AudioConvertPack) MAKE_PACK_FUNC_NAME (u8),

View file

@ -362,7 +362,7 @@ MAKE_QUANTIZE_FUNC_F (float_tpdf_hf_medium, INIT_DITHER_TPDF_HF_F,
MAKE_QUANTIZE_FUNC_F (float_tpdf_hf_high, INIT_DITHER_TPDF_HF_F, INIT_NS_HIGH,
ADD_NS_HIGH, ADD_DITHER_TPDF_HF_F, UPDATE_ERROR_HIGH);
static AudioConvertQuantize quantize_funcs[] = {
static const AudioConvertQuantize quantize_funcs[] = {
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_none_none),
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_rpdf_none),
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_tpdf_none),

View file

@ -1388,7 +1388,7 @@ speex_resampler_sinc_filter_mode_get_type (void)
static GType speex_resampler_sinc_filter_mode_type = 0;
if (!speex_resampler_sinc_filter_mode_type) {
static GEnumValue sinc_filter_modes[] = {
static const GEnumValue sinc_filter_modes[] = {
{SPEEX_RESAMPLER_SINC_FILTER_INTERPOLATED, "Use interpolated sinc table",
"interpolated"},
{SPEEX_RESAMPLER_SINC_FILTER_FULL, "Use full sinc table", "full"},

View file

@ -224,7 +224,7 @@ struct SpeexResamplerState_
int use_neon:1;
};
static double kaiser12_table[68] = {
static const double kaiser12_table[68] = {
0.99859849, 1.00000000, 0.99859849, 0.99440475, 0.98745105, 0.97779076,
0.96549770, 0.95066529, 0.93340547, 0.91384741, 0.89213598, 0.86843014,
0.84290116, 0.81573067, 0.78710866, 0.75723148, 0.72629970, 0.69451601,
@ -240,7 +240,7 @@ static double kaiser12_table[68] = {
};
/*
static double kaiser12_table[36] = {
static const double kaiser12_table[36] = {
0.99440475, 1.00000000, 0.99440475, 0.97779076, 0.95066529, 0.91384741,
0.86843014, 0.81573067, 0.75723148, 0.69451601, 0.62920216, 0.56287762,
0.49704014, 0.43304576, 0.37206735, 0.31506490, 0.26276832, 0.21567274,
@ -248,7 +248,7 @@ static double kaiser12_table[36] = {
0.03111947, 0.02127838, 0.01402878, 0.00886058, 0.00531256, 0.00298291,
0.00153438, 0.00069463, 0.00025272, 0.0000527734, 0.00000500, 0.00000000};
*/
static double kaiser10_table[36] = {
static const double kaiser10_table[36] = {
0.99537781, 1.00000000, 0.99537781, 0.98162644, 0.95908712, 0.92831446,
0.89005583, 0.84522401, 0.79486424, 0.74011713, 0.68217934, 0.62226347,
0.56155915, 0.50119680, 0.44221549, 0.38553619, 0.33194107, 0.28205962,
@ -257,7 +257,7 @@ static double kaiser10_table[36] = {
0.00488951, 0.00257636, 0.00115101, 0.00035515, 0.00000000, 0.00000000
};
static double kaiser8_table[36] = {
static const double kaiser8_table[36] = {
0.99635258, 1.00000000, 0.99635258, 0.98548012, 0.96759014, 0.94302200,
0.91223751, 0.87580811, 0.83439927, 0.78875245, 0.73966538, 0.68797126,
0.63451750, 0.58014482, 0.52566725, 0.47185369, 0.41941150, 0.36897272,
@ -266,7 +266,7 @@ static double kaiser8_table[36] = {
0.01563093, 0.00959968, 0.00527363, 0.00233883, 0.00050000, 0.00000000
};
static double kaiser6_table[36] = {
static const double kaiser6_table[36] = {
0.99733006, 1.00000000, 0.99733006, 0.98935595, 0.97618418, 0.95799003,
0.93501423, 0.90755855, 0.87598009, 0.84068475, 0.80211977, 0.76076565,
0.71712752, 0.67172623, 0.62508937, 0.57774224, 0.53019925, 0.48295561,
@ -277,7 +277,7 @@ static double kaiser6_table[36] = {
struct FuncDef
{
double *table;
const double *table;
int oversample;
};