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

Mixing enum types #383

Open
pascalhorton opened this issue Jul 20, 2017 · 0 comments
Open

Mixing enum types #383

pascalhorton opened this issue Jul 20, 2017 · 0 comments
Labels

Comments

@pascalhorton
Copy link
Member

Enum types are mixed in tmlayermanager.cpp line 348:

if (myLayerProp->GetType() > TOC_NAME_NOT_GENERIC) {
	...
	myLayer->m_LayerType = (PRJDEF_LAYERS_TYPE) myLayerProp->GetType();
	...
}

with m_LayerType and myLayerProp->GetType() being TOC_GENERIC_NAME

and the enums being:

enum PRJDEF_LAYERS_TYPE
{
	LAYER_LINE = 0,
	LAYER_POINT,
	LAYER_POLYGON
};
enum TOC_GENERIC_NAME
{
	TOC_NAME_LINES = 0,
	TOC_NAME_POINTS,
	TOC_NAME_LABELS,
	TOC_NAME_ANNOTATIONS,
	TOC_NAME_FRAME,
	TOC_NAME_NOT_GENERIC = 100,
	TOC_NAME_TIFF,
	TOC_NAME_EGRID,
	TOC_NAME_JPEG,
	TOC_NAME_WEB,
	TOC_NAME_SHP,
	TOC_NAME_UNKNOWN = 120
};

With the condition of TOC_GENERIC_NAME being superior to TOC_NAME_NOT_GENERIC, the values of PRJDEF_LAYERS_TYPE cannot be matched.

@pascalhorton pascalhorton added this to the 2.7 Codename 'Torre' milestone Jul 20, 2017
@pascalhorton pascalhorton removed this from the 3.0 Codename 'Torre' milestone Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant