Remove NULL from native/src

Change-Id: I5299af7773d28fd12faebbfe644829a401ae5644
main
Tadashi G. Takaoka 2011-10-28 17:02:09 +09:00
parent 5049f5bbb4
commit 0e97148f6d
4 changed files with 3 additions and 11 deletions

View File

@ -87,7 +87,7 @@ inline static void calcEditDistanceOneStep(int *editDistanceTable, const unsigne
int *const current = editDistanceTable + outputLength * (inputLength + 1);
const int *const prev = editDistanceTable + (outputLength - 1) * (inputLength + 1);
const int *const prevprev =
outputLength >= 2 ? editDistanceTable + (outputLength - 2) * (inputLength + 1) : NULL;
outputLength >= 2 ? editDistanceTable + (outputLength - 2) * (inputLength + 1) : 0;
current[0] = outputLength;
const uint32_t co = Dictionary::toBaseLowerCase(output[outputLength - 1]);
const uint32_t prevCO =

View File

@ -47,7 +47,7 @@ ProximityInfo::ProximityInfo(const int maxProximityCharsSize, const int keyboard
HAS_TOUCH_POSITION_CORRECTION_DATA(keyCount > 0 && keyXCoordinates && keyYCoordinates
&& keyWidths && keyHeights && keyCharCodes && sweetSpotCenterXs
&& sweetSpotCenterYs && sweetSpotRadii),
mInputXCoordinates(NULL), mInputYCoordinates(NULL),
mInputXCoordinates(0), mInputYCoordinates(0),
mTouchPositionCorrectionEnabled(false) {
const int len = GRID_WIDTH * GRID_HEIGHT * MAX_PROXIMITY_CHARS_SIZE;
mProximityCharsArray = new uint32_t[len];

View File

@ -21,10 +21,6 @@
#include "defines.h"
#ifndef NULL
#define NULL 0
#endif
namespace latinime {
class Correction;
@ -60,7 +56,7 @@ public:
bool existsCharInProximityAt(const int index, const int c) const;
bool existsAdjacentProximityChars(const int index) const;
ProximityType getMatchedProximityId(const int index, const unsigned short c,
const bool checkProximityChars, int *proximityIndex = NULL) const;
const bool checkProximityChars, int *proximityIndex = 0) const;
int getNormalizedSquaredDistance(const int inputIndex, const int proximityIndex) const {
return mNormalizedSquaredDistances[inputIndex * MAX_PROXIMITY_CHARS_SIZE + proximityIndex];
}

View File

@ -23,10 +23,6 @@
#include "defines.h"
#include "proximity_info.h"
#ifndef NULL
#define NULL 0
#endif
namespace latinime {
class UnigramDictionary {