Use |const|. DEBUG-only.

This commit is contained in:
dbaron%dbaron.org 2004-01-21 23:08:51 +00:00
parent 23ecb8ff4e
commit cd5b87a264
2 changed files with 10 additions and 10 deletions

View File

@ -108,7 +108,7 @@ struct BlockDebugFlags {
PRBool* on;
};
static BlockDebugFlags gFlags[] = {
static const BlockDebugFlags gFlags[] = {
{ "reflow", &nsBlockFrame::gNoisyReflow },
{ "really-noisy-reflow", &nsBlockFrame::gReallyNoisyReflow },
{ "max-element-width", &nsBlockFrame::gNoisyMaxElementWidth },
@ -125,8 +125,8 @@ static void
ShowDebugFlags()
{
printf("Here are the available GECKO_BLOCK_DEBUG_FLAGS:\n");
BlockDebugFlags* bdf = gFlags;
BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
const BlockDebugFlags* bdf = gFlags;
const BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
for (; bdf < end; bdf++) {
printf(" %s\n", bdf->name);
}
@ -148,8 +148,8 @@ nsBlockFrame::InitDebugFlags()
if (cm) *cm = '\0';
PRBool found = PR_FALSE;
BlockDebugFlags* bdf = gFlags;
BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
const BlockDebugFlags* bdf = gFlags;
const BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
for (; bdf < end; bdf++) {
if (PL_strcasecmp(bdf->name, flags) == 0) {
*(bdf->on) = PR_TRUE;

View File

@ -108,7 +108,7 @@ struct BlockDebugFlags {
PRBool* on;
};
static BlockDebugFlags gFlags[] = {
static const BlockDebugFlags gFlags[] = {
{ "reflow", &nsBlockFrame::gNoisyReflow },
{ "really-noisy-reflow", &nsBlockFrame::gReallyNoisyReflow },
{ "max-element-width", &nsBlockFrame::gNoisyMaxElementWidth },
@ -125,8 +125,8 @@ static void
ShowDebugFlags()
{
printf("Here are the available GECKO_BLOCK_DEBUG_FLAGS:\n");
BlockDebugFlags* bdf = gFlags;
BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
const BlockDebugFlags* bdf = gFlags;
const BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
for (; bdf < end; bdf++) {
printf(" %s\n", bdf->name);
}
@ -148,8 +148,8 @@ nsBlockFrame::InitDebugFlags()
if (cm) *cm = '\0';
PRBool found = PR_FALSE;
BlockDebugFlags* bdf = gFlags;
BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
const BlockDebugFlags* bdf = gFlags;
const BlockDebugFlags* end = gFlags + NUM_DEBUG_FLAGS;
for (; bdf < end; bdf++) {
if (PL_strcasecmp(bdf->name, flags) == 0) {
*(bdf->on) = PR_TRUE;