Skip to content

Commit a445530

Browse files
committed
[minor refactor] Add const attribute
1 parent b03a78d commit a445530

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/TransductionStack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ for (;;) {
13191319

13201320
/* If we arrive here, the variable was neither a normal one nor an output one,
13211321
* so we try to match dictionary one */
1322-
struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
1322+
const struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
13231323
if (entry==NULL) {
13241324
/* If the variable is not defined properly */
13251325
if (field[0]=='S') {
@@ -1340,7 +1340,7 @@ for (;;) {
13401340
}
13411341
}
13421342

1343-
struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
1343+
const struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
13441344
if (entry==NULL) {
13451345
switch (p->variable_error_policy) {
13461346
case EXIT_ON_VARIABLE_ERRORS: fatal_error("Output error: undefined morphological variable %S\n",name); break;

src/TransductionStackTfst.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ while (s[i]!='\0') {
262262
}
263263
} else {
264264
/* Here we deal with dictionary variable things like $a.CODE$ */
265-
struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
265+
const struct dela_entry* entry=get_dic_variable(name,p->dic_variables);
266266
if (entry==NULL) {
267267
switch (p->variable_error_policy) {
268268
case EXIT_ON_VARIABLE_ERRORS: fatal_error("Output error: undefined morphological variable %S\n",name);

0 commit comments

Comments
 (0)