Reply To: MWEdit

Home Forums Projects MWEdit Reply To: MWEdit

#4198

Some of the arrays have stray commas in them. I forget if an empty comma means it’s automatically initialized to zero or whatever but that’ll need to be looked at before the strays are removed.

Here’s an example from EsmSoundGen.cpp:

const TCHAR *l_SoundGenTypes[] = {
	_T("Left Foot"),
	_T("Right Foot"),
	_T("Swim Left"),
	_T("Swim Right"),
	_T("Moan"),
	_T("Roar"),
	_T("Scream"),
	_T("Land"),
};

The final element has a stray comma. It’s possible that it automatically sets the missing element to zero but I’ll need to relearn that. If so, then the zero or null values need to be added instead of a blank entry. If it means nothing, then the strays should probably be removed.

project/EditViewObj.cpp can be removed. It’s an empty source file and not mentioned in any file at all and doesn’t have an associated header file. Same with project/EditViewSort.cpp. Will remove them when I rename the couple of files that need it.

Edit:

I think we can remove the stray commas as we have this in project/EsmContainDlg.cpp:

static esmcoldata_t l_ItemColData[] = {
	{
		_T("Count"),
		ESM_FIELD_CUSTOM,
		LVCFMT_CENTER,
		ESMLIST_WIDTH_COUNT + 20,
		ESMLIST_SUBITEM_COUNT,
		l_ContSortCallBack
	},
	{
		_T("ID"),
		ESM_FIELD_ID,
		LVCFMT_LEFT,
		ESMLIST_WIDTH_ID,
		ESMLIST_SUBITEM_ID,
	},
	{
		_T("Mod"),
		ESM_FIELD_CHANGED,
		LVCFMT_CENTER,
		ESMLIST_WIDTH_CHANGED,
		ESMLIST_SUBITEM_CHANGED
	},
	{
		_T("Name"),
		ESM_FIELD_NAME,
		LVCFMT_LEFT,
		ESMLIST_WIDTH_NAME,
		ESMLIST_SUBITEM_NAME
	},
	{
		_T("Type"),
		ESM_FIELD_ITEMTYPE,
		LVCFMT_LEFT,
		ESMLIST_WIDTH_INDEX,
		ESMLIST_SUBITEM_ITEMTYPE
	},
	{
		NULL,
		0,
		0,
		0
	} /* Must be last record */
};

It uses a mixture but the number of elements also differs in each block. Not entirely sure, more research is definitely needed.