Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
removed strtok() , it caused bug in msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
nashidp committed Feb 6, 2021
1 parent 444d52c commit 4b79624
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,7 @@ void Window::showSurah()
{
std::string surah_url = "https://api.alquran.cloud/v1/surah/";
std::string translation_url = surah_url;
std::vector<std::string>data;
char *token = strtok((char *)surah->currentText().toStdString().c_str(), "."); // Tokenize String
while(token != NULL)
{
// Strings before and after '.' character is pushed to vector

data.push_back(token);
token = strtok(NULL, ".");
}
surah_number = std::stoi(data.at(0));
surah_number = surah->currentIndex() + 1;
surah_url.append(std::to_string(surah_number) + "/");
surah_url.append("quran-simple-enhanced");
edition = getEdition(translation->currentText().toStdString());
Expand Down

0 comments on commit 4b79624

Please sign in to comment.