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 » Developing U++ » U++ Developers corner » styling of widgets ( animation / look and feel)
Re: styling of widgets ( animation / look and feel) [message #60860 is a reply to message #60788] Sun, 22 September 2024 09:28 Go to previous messageGo to previous message
dodobar is currently offline  dodobar
Messages: 22
Registered: April 2023
Location: Germany
Promising Member
Thanks Mirek,
I tried a merge but get map.hpp conflict
template <class K, class T, class V>
template <class KK, class TT>
T&  AMap<K, T, V>::GetPut_(KK&& k, TT&& x)
{
<<<<<<< HEAD
	int i = key.Find(std::forward<KK>(k));
	if(i < 0) {
		i = key.Put(k);
		if(i < value.GetCount())
			return value[i] = std::forward<TT>(x);
		return value.Add(std::forward<TT>(x));
	}
	return value[i];
=======
	bool put = false;
	int i = key.FindPut(std::forward<KK>(k), put);
	if(i < value.GetCount()) {
		if(put)
			value[i] = std::forward<TT>(x);
		return value[i];
	}
	return value.Add(std::forward<TT>(x));
>>>>>>> master
}


Will try this, Hopefully this is ok ?? :

template <class K, class T, class V>
template <class KK, class TT>
T& AMap<K, T, V>::GetPut_(KK&& k, TT&& x)
{
    bool put = false;
    int i = key.FindPut(std::forward<KK>(k), put);
    if(i < value.GetCount()) {
        if(put) {
            value[i] = std::forward<TT>(x);  // Update if a new key was inserted
        }
        return value[i];  // Return the existing or updated value
    }
    return value.Add(std::forward<TT>(x));  // Add new value if not found
}
 
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: AsyncWork and pick/std::move problems...
Next Topic: U++ GTK Wayland Port
Goto Forum:
  


Current Time: Tue Jul 15 10:03:38 CEST 2025

Total time taken to generate the page: 0.04290 seconds