Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scoring #189

Merged
merged 3 commits into from
Nov 16, 2020
Merged

Fix scoring #189

merged 3 commits into from
Nov 16, 2020

Conversation

dl1jbe
Copy link
Member

@dl1jbe dl1jbe commented Nov 10, 2020

Correct scoring of CONTINENT_LIST_POINTS (see first part of issue #178)

- move continentlist_only handling
- add some syntactic sugar
@zcsahok
Copy link
Member

zcsahok commented Nov 10, 2020

Just a related question: a number of related configs (CONTINENT_LIST_POINTS, MY_CONTINENT_POINTS, etc) do not allow overwriting, i.e.

            if (my_cont_points == -1)
                my_cont_points = atoi(c_temp);

Is this intentional?

I looked at the condition in USE_IF_SET and was wondering why != -1 is used, so checked other parts of the code. (my preference would have been >= 0)
I'm working on improving config parsing, hence the question.

@dl1jbe
Copy link
Member Author

dl1jbe commented Nov 10, 2020

Just a related question: a number of related configs (CONTINENT_LIST_POINTS, MY_CONTINENT_POINTS, etc) do not allow overwriting, i.e.

            if (my_cont_points == -1)
                my_cont_points = atoi(c_temp);

Is this intentional?

Good question. I did a lookup in old versions and found it already in tlf-0.9.10 dated from 2003.

So I do not really have an answer but assume it was so that only your first keyword got used if you put the keyword in the config twice.

I think it would be ok to drop it and accept the last occurrence of the keyword instead only the first one.

I looked at the condition in USE_IF_SET and was wondering why != -1 is used, so checked other parts of the code. (my preference would have been >= 0)
I'm working on improving config parsing, hence the question.

The '!= -1' comes from the default initialization of the variables. But, yes any negative number could be used as an 'not set' indicator'.

@dl1jbe dl1jbe merged commit 52fc4d3 into Tlf:master Nov 16, 2020
@dl1jbe dl1jbe mentioned this pull request Nov 19, 2020
@dl1jbe dl1jbe deleted the fix_scoring branch November 23, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants