Reply To: MWEdit

Home Forums Projects MWEdit Reply To: MWEdit

#5005

Test_TemplateArray() in common/container/tem_array is bad. It’s got lines like this: CreatePointer(pTestInt, (long)(12345678l));. That’s incorrect as CreatePointer takes a pointer object and a type, not a number:

#define CreatePointer(pObject, Type) { \
		(pObject) = new Type; \
		if ((pObject) == NULL) { \
			SystemLog.Printf(stderr, _T("Failed to allocate %u bytes!"), sizeof(Type)); \
			throw (_T("Out of Memory!")); \
		} }

I’ll comment those lines out for now as I’m not entirely sure what they’re supposed to accomplish (working through the errors for the DEBUG portions of the code which we haven’t done yet).

Edit:

Going to take another day or so. As usual, I mistyped some of the paths so I’m fixing them as the CI complains. I’m also fixing some MSVC and C++20 compatibilities that exist with the types and preprocessor stuff that wasn’t caught earlier due to the debug builds not being enabled