Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » bug in latest svn
Re: bug in latest svn [message #15781 is a reply to message #15763] Wed, 07 May 2008 22:07 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Wed, 07 May 2008 07:59

Novo wrote on Mon, 05 May 2008 22:07

luzr wrote on Sun, 04 May 2008 12:28

Well, second return is never performed. It is there only to shut-up the compiler about missing return.... (which, of course, in this context sounds like void effort Smile



In this case I have two questions:

1) Why you are not using something like mutex guard for such code? That would eliminate requirement in "return String()".

2) Why this code was left not thread-safe?

Just curios ...



Well, INTERLOCKED_ is a mutex guard...

Unfortunately, the compiler is not able to figure out that second return never takes place...

Mirek



What is wrong with the code below?

const String& GetCppFile(int i)
{
	Mutex::Lock guard(cpp_file_mutex);

	return cpp_file[i];
}


What is so special about INTERLOCKED_ ?


Regards,
Novo

[Updated on: Wed, 07 May 2008 22:07]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Some lack of features
Next Topic: [BUG] Ide loses "maximized" setting on minimize
Goto Forum:
  


Current Time: Sun May 12 17:27:19 CEST 2024

Total time taken to generate the page: 0.02401 seconds