| 5091 | } |
| 5092 | |
| 5093 | IGFD_C_API char* IGFD_GetCurrentFilter(ImGuiFileDialog* vContextPtr) { |
| 5094 | char* res = nullptr; |
| 5095 | |
| 5096 | if (vContextPtr != nullptr) { |
| 5097 | auto s = vContextPtr->GetCurrentFilter(); |
| 5098 | if (!s.empty()) { |
| 5099 | size_t siz = s.size() + 1U; |
| 5100 | res = (char*)malloc(siz); |
| 5101 | if (res) { |
| 5102 | #ifndef _MSC_VER |
| 5103 | strncpy(res, s.c_str(), siz); |
| 5104 | #else // _MSC_VER |
| 5105 | strncpy_s(res, siz, s.c_str(), siz); |
| 5106 | #endif // _MSC_VER |
| 5107 | res[siz - 1U] = '\0'; |
| 5108 | } |
| 5109 | } |
| 5110 | } |
| 5111 | |
| 5112 | return res; |
| 5113 | } |
| 5114 | |
| 5115 | IGFD_C_API void* IGFD_GetUserDatas(ImGuiFileDialog* vContextPtr) { |
| 5116 | if (vContextPtr != nullptr) { |
nothing calls this directly
no test coverage detected