Stop using GNU extension in-class initializer for non-integral members

Change-Id: Ibc8f1c67aba91bdfeceef763ac82d61cc8d2efe1
main
Ken Wakasa 2012-09-16 01:23:56 +09:00
parent 03dc8fe141
commit 764dd71203
2 changed files with 11 additions and 5 deletions

View File

@ -25,6 +25,13 @@
#include "proximity_info_state.h"
namespace latinime {
const int ProximityInfoState::NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR_LOG_2 = 10;
const int ProximityInfoState::NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR =
1 << NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR_LOG_2;
const float ProximityInfoState::NOT_A_DISTANCE_FLOAT = -1.0f;
const int ProximityInfoState::NOT_A_CODE = -1;
void ProximityInfoState::initInputParams(const int pointerId, const float maxPointToKeyLength,
const ProximityInfo *proximityInfo, const int32_t *const inputCodes, const int inputSize,
const int *const xCoordinates, const int *const yCoordinates, const int *const times,

View File

@ -34,11 +34,10 @@ class ProximityInfo;
class ProximityInfoState {
public:
typedef std::bitset<MAX_KEY_COUNT_IN_A_KEYBOARD> NearKeycodesSet;
static const int NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR_LOG_2 = 10;
static const int NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR =
1 << NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR_LOG_2;
static const float NOT_A_DISTANCE_FLOAT = -1.0f;
static const int NOT_A_CODE = -1;
static const int NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR_LOG_2;
static const int NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR;
static const float NOT_A_DISTANCE_FLOAT;
static const int NOT_A_CODE;
/////////////////////////////////////////
// Defined in proximity_info_state.cpp //