0 fails to send the message to human readers that the variable is
a pointer, but nullptr does. for improving the readability, let's
use nullptr when the variable in question is a pointer.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
// create a pointer to store an encoding table address
if (!encoding_table[technique][k][m][c][w]) {
encoding_table[technique][k][m][c][w] = new (int*);
- *encoding_table[technique][k][m][c][w] = 0;
+ *encoding_table[technique][k][m][c][w] = nullptr;
}
return encoding_table[technique][k][m][c][w];
}
int* dm_column; // size: k
int* minimum; // size: k+m
DecodingCacheParameter() {
- decoding_matrix = 0;
- dm_row = 0;
- dm_column = 0;
- minimum = 0;
+ decoding_matrix = nullptr;
+ dm_row = nullptr;
+ dm_column = nullptr;
+ minimum = nullptr;
}
~DecodingCacheParameter() {
if (decoding_matrix) {