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++ Library support » U++ Core » LoadFile("/sys/devices/virtual/thermal/ ...") does not work
Re: LoadFile("/sys/devices/virtual/thermal/ ...") does not work [message #58417 is a reply to message #58416] Wed, 18 May 2022 11:10 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
mirek wrote on Wed, 18 May 2022 12:04
Tom1 wrote on Wed, 18 May 2022 10:47
mirek wrote on Wed, 18 May 2022 11:29
Empty file issue fixed (with len >= 0).

Not sure what do you mean with IsVoid problem, piece of code maybe?

OK, I found the reason causing part of my testing issues:
	if(String::GetVoid().IsVoid()) Cout() << "String::GetVoid().IsVoid() works!\n";
	else Cout() << "String::GetVoid().IsVoid() fails!\n";
	if(IsVoid(String::GetVoid())) Cout() << "IsVoid(String::GetVoid()) works!\n";
	else Cout() << "IsVoid(String::GetVoid()) fails!\n";



Best regards,

Tom

EDIT: Improved test code.


Uhm, that is actually API problem:

IsVoid(const Value&) function is about Value - it tells you that Value was not assigned anything. In above example you assign it a String, so it must return false.

I agree this is a bit confusing, but I am not sure there is a solution to that.

Mirek


How about introducing an additional IsVoid variant?:
bool IsVoid(const String &s){ return s.IsVoid(); }

Best regards,

Tom
 
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: BiArray::Create{Head,Tail} with variadic args
Next Topic: Serialize long as uint64 on some platforms
Goto Forum:
  


Current Time: Sun Apr 28 20:04:42 CEST 2024

Total time taken to generate the page: 0.03284 seconds