parent
46650b73a1
commit
25e110c999
|
@ -633,7 +633,9 @@ void Thread::initializeOpenMP(size_t threadCount) {
|
|||
}
|
||||
const std::string threadName = "Mitsuba: " + thread->getName();
|
||||
|
||||
#if defined(__LINUX__) || defined(__OSX__)
|
||||
#if defined(__LINUX__)
|
||||
pthread_setname_np(pthread_self(), threadName.c_str());
|
||||
#elif defined(__OSX__)
|
||||
pthread_setname_np(threadName.c_str());
|
||||
#elif defined(__WINDOWS__)
|
||||
SetThreadName(threadName.c_str());
|
||||
|
|
|
@ -142,7 +142,7 @@ bool ply::ply_parser::parse(std::istream& istream)
|
|||
std::string& type = type_or_list;
|
||||
char space_type_name;
|
||||
stringstream >> space_type_name >> std::ws >> name >> std::ws;
|
||||
if (!stringstream || !std::isspace(space_type_name)) {
|
||||
if (!stringstream.eof() || !std::isspace(space_type_name)) {
|
||||
if (error_callback_) {
|
||||
error_callback_(line_number_, "parse error");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue