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 » DarkThemeCached
Re: DarkThemeCached [message #57073 is a reply to message #57072] Thu, 20 May 2021 23:44 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Hello Didier,


That line is supposed to return the remainder of (cache.ii + 1) / N operation, namely (cache.ii + 1) % N (=8) Its function is to clamp the index between 0-7.
A known microptimization trick, if the ii is a positive integer and the N is a power of 2.

(Apparently, colors are cached in thread_local slots))


Best regards,
Oblivion


[Updated on: Fri, 21 May 2021 00:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Deprecating THISBACK
Next Topic: Small optimization
Goto Forum:
  


Current Time: Mon May 13 03:59:08 CEST 2024

Total time taken to generate the page: 0.02306 seconds