From 8241861213ec0ae1e375b156152218fb5cdfcaa7 Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Mon, 1 Mar 2004 01:40:02 +0000 Subject: [PATCH] improved magic number variable names git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6832 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/translators/shared/BaseTranslator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/add-ons/translators/shared/BaseTranslator.cpp b/src/add-ons/translators/shared/BaseTranslator.cpp index 964678ccd8..476a0807dd 100644 --- a/src/add-ons/translators/shared/BaseTranslator.cpp +++ b/src/add-ons/translators/shared/BaseTranslator.cpp @@ -364,7 +364,7 @@ BaseTranslator::BitsCheck(BPositionIO *inSource, BMessage *ioExtension, // Convert the magic numbers to the various byte orders so that // I won't have to convert the data read in to see whether or not // it is a supported type - uint32 nbits = B_HOST_TO_BENDIAN_INT32(B_TRANSLATOR_BITMAP); + const uint32 kBitsMagic = B_HOST_TO_BENDIAN_INT32(B_TRANSLATOR_BITMAP); // Read in the magic number and determine if it // is a supported type @@ -379,9 +379,9 @@ BaseTranslator::BitsCheck(BPositionIO *inSource, BMessage *ioExtension, if (ioExtension && fSettings->LoadSettings(ioExtension) < B_OK) return B_BAD_VALUE; - uint32 n32ch; - memcpy(&n32ch, ch, sizeof(uint32)); - if (n32ch == nbits) + uint32 sourceMagic; + memcpy(&sourceMagic, ch, sizeof(uint32)); + if (sourceMagic == kBitsMagic) return B_OK; else return B_OK + 1;