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 » AMap::GetPut (k, v)
AMap::GetPut (k, v) [message #60063] Sun, 30 July 2023 13:06 Go to next message
bozero is currently offline  bozero
Messages: 20
Registered: June 2018
Promising Member
I notice that GetPut(key, value) just cause assertion fail when the key is not in map, not like GetAdd(key, value) that will create new element in such case.
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	StdLogSetup(LOG_FILE | LOG_COUT);
	VectorMap<String, int> vm;
	vm.GetAdd("getadd", 1); // ok
	vm.GetPut("getput", 2); // Assertion failed
}

Re: AMap::GetPut (k, v) [message #60067 is a reply to message #60063] Wed, 02 August 2023 11:29 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, fixed, should be in nightly tomorrow.
Previous Topic: Vector
Next Topic: FormatE() with 0.0
Goto Forum:
  


Current Time: Mon Apr 29 02:41:12 CEST 2024

Total time taken to generate the page: 0.02839 seconds