add const

This commit is contained in:
Akash Mozumdar 2018-07-30 00:19:44 -07:00
parent cf2a658ac7
commit 7a39c40936
2 changed files with 4 additions and 3 deletions

View File

@ -36,8 +36,9 @@ std::wstring DispatchSentenceToExtensions(std::wstring sentence, std::unordered_
{ {
while (processing < 0) Sleep(10); while (processing < 0) Sleep(10);
processing++; processing++;
wchar_t* sentenceBuffer = new wchar_t[sentence.size() + 1]; wchar_t* sentenceOrigBuffer = new wchar_t[sentence.size() + 1];
wcscpy(sentenceBuffer, sentence.c_str()); wcscpy(sentenceOrigBuffer, sentence.c_str());
const wchar_t* sentenceBuffer = sentenceOrigBuffer;
InfoForExtension* miscInfoLinkedList = new InfoForExtension; InfoForExtension* miscInfoLinkedList = new InfoForExtension;
InfoForExtension* miscInfoTraverser = miscInfoLinkedList; InfoForExtension* miscInfoTraverser = miscInfoLinkedList;
for (auto i : miscInfo) for (auto i : miscInfo)

View File

@ -16,7 +16,7 @@ struct InfoForExtension
int propertyValue; int propertyValue;
InfoForExtension* nextProperty; InfoForExtension* nextProperty;
}; };
typedef wchar_t*(*ExtensionFunction)(wchar_t*, InfoForExtension*); typedef const wchar_t*(*ExtensionFunction)(const wchar_t*, InfoForExtension*);
extern QComboBox* ttCombo; extern QComboBox* ttCombo;
#endif // EXTENSIONS_H #endif // EXTENSIONS_H