This is in Common so they’re not game support. All of the game support is in the esm directory. Ah, I’ve got it: it’s a leftover file that isn’t actually used. It doesn’t show up anywhere else. Will remove it now. It’ll break the Meson build file so I’ll go ahead and update the pull request.
Out of interest, here’s the grep result:
$ grep --recursive --line-number ObjArray
Common/Contain/ObjArray.h:7: * Defines the template class TObjArray which defines a class to hold an
Common/Contain/ObjArray.h:21: * Begin Class TObjArray Definition
Common/Contain/ObjArray.h:27:template <class CObjType> class TObjArray {
Common/Contain/ObjArray.h:39: TObjArray(const int MaxSize = 0, const int GrowSize = -1);
Common/Contain/ObjArray.h:40: virtual ~TObjArray() {
Common/Contain/ObjArray.h:190: * Class TObjArray Constructor - TObjArray (MaxSize);
Common/Contain/ObjArray.h:196:template <class CObjType> TObjArray<CObjType>::TObjArray(const int MaxSize, const int GrowSize) :
Common/Contain/ObjArray.h:198: //DEFINE_FUNCTION("TObjArray::TObjArray()");
Common/Contain/ObjArray.h:203: * Template TObjArray Method - void Destroy (void);
Common/Contain/ObjArray.h:207:void TObjArray<CObjType>::Destroy() {
Common/Contain/ObjArray.h:208: //DEFINE_FUNCTION("TObjArray::Destroy()");
Common/Contain/ObjArray.h:214: * Class TObjArray Method - CObjType* AddNew (void);
Common/Contain/ObjArray.h:220:CObjType *TObjArray<CObjType>::AddNew() {
Common/Contain/ObjArray.h:231: * Class TObjArray Method - void DeleteElement (pString);
Common/Contain/ObjArray.h:237:void TObjArray<CObjType>::DeleteElement(CObjType *pObject) {
Common/Contain/ObjArray.h:251: * Class TObjArray Method - void DeleteElement (Index);
Common/Contain/ObjArray.h:257:void TObjArray<CObjType>::DeleteElement(const int Index) {
Common/Contain/ObjArray.h:258: DEFINE_FUNCTION("TObjArray::DeleteElement()");
Common/Contain/ObjArray.h:275: * Template TObjArray Method - void DeleteElements_Priv (void);
Common/Contain/ObjArray.h:281:void TObjArray<CObjType>::DeleteElements_Priv() {
Common/Contain/ObjArray.h:282: DEFINE_FUNCTION("TObjArray::DeleteElements_Priv()");
Common/Contain/ObjArray.h:298: * Template TObjArray Method - void SetMaxElements (MaxSize);
Common/Contain/ObjArray.h:304:void TObjArray<CObjType>::SetMaxElements(const int MaxSize) {
Common/Contain/ObjArray.h:305: //DEFINE_FUNCTION("TObjArray::SetMaxElements()");
Common/Contain/ObjArray.cpp:7: * Contains test procedures for the TObjArray template.
Common/Contain/ObjArray.cpp:20:DEFINE_FILE("ObjArray.cpp");
Common/Contain/ObjArray.cpp:28:TObjArray<long> m_LongArray;
Common/Contain/ObjArray.cpp:29:TObjArray<fixedstring> m_StringArray;
grep: .git/index: binary file matches
meson.build:9: 'Common/Contain/ObjArray.cpp',
$ grep --recursive --line-number objarray
Common/Contain/ObjArray.cpp:12:#include "objarray.h"
There are likely others but the build errors will help us track them down!
Edit:
Okay, pull request has been updated with those files removed 🙂
It’s also part of the previous task item of removing as much of Common as we can 🙂
Still unsure about PQSORT_CMPFUNC. It’s used in Common/dl_base.h and Common/dl_base.cpp so we definitely need to figure out where that’s coming from. It’s definitely not defined in the project per the grep result. Maybe it’s from an obscure Windows file?
$ git grep --recursive --line-number PQSORT_CMPFUNC
Common/Contain/PtrArray.h:45: PQSORT_CMPFUNC m_pCmpFunc; /* Pointer to a user supplied compare function */
Common/Contain/PtrArray.h:89: int FindFastFunc(PQSORT_CMPFUNC pCompareFunc, void *pElement2);
Common/Contain/PtrArray.h:91: int FindBSearch(PQSORT_CMPFUNC_ORIG pCompareFunc, void *pElement2);
Common/Contain/PtrArray.h:152: void SetCompareFunc(PQSORT_CMPFUNC pFunction) {
Common/Contain/PtrArray.h:526:int TPtrArray<TArrayPtr>::FindFastFunc(PQSORT_CMPFUNC pCompareFunc, void *pElement2) {
Common/Contain/PtrArray.h:610:int TPtrArray<TArrayPtr>::FindBSearch(PQSORT_CMPFUNC_ORIG pCompareFunc, void *pElement) {
Common/Contain/temarray.h:44: PQSORT_CMPFUNC m_pCmpFunc; /* Pointer to a user supplied compare function */
Common/Contain/temarray.h:117: void SetCompareFunc(PQSORT_CMPFUNC pFunction) {
Common/dl_base.cpp:28:PQSORT_CMPFUNC l_QSortCmpFunc = NULL;
Common/dl_base.cpp:135: PQSORT_CMPFUNC pCmpFunc,
Common/dl_base.h:265:typedef int (_cdecl *PQSORT_CMPFUNC)(const void *pElem1,
Common/dl_base.h:268:typedef int (_cdecl *PQSORT_CMPFUNC_ORIG)(const void *pElem1, const void *pElem2);
Common/dl_base.h:423: PQSORT_CMPFUNC pCmpFunc,
Common/dl_base.h:444:extern PQSORT_CMPFUNC l_QSortCmpFunc;
It could potentially be the function pointer in dl_base. I’m not well versed on them, though, so I can’t tell if it’s defining a type with PQSORT_CMPFUNC as the name or using it. Comparing it to the new qsort implementation, that’s what it looks like it’s doing. qsort is used in PtrArray, which is used extensively in the esm directory. From the search, qsort is really only used in PtrArray so we may be able to move it over there to help with organization.
Looks like we’ve got that mystery solved, at least 🙂
