u32 get_integer(const registry& psf, const std::string& key, u32 def) { const auto found = psf.find(key); if (found == psf.end() || found->second.type() != format::integer) { return def; } return found->second.as_integer(); }
std::string get_string(const registry& psf, const std::string& key, const std::string& def) { const auto found = psf.find(key); if (found == psf.end() || (found->second.type() != format::string && found->second.type() != format::array)) { return def; } return found->second.as_string(); }
EXPORT_C void exception_safety_tester::freed( void* p ) { if( m_internal_activity ) return; activity_guard ag( m_internal_activity ); registry::iterator it = m_memory_in_use.find( p ); if( it != m_memory_in_use.end() ) { m_execution_path[it->second].m_alloc.ptr = 0; m_memory_in_use.erase( it ); } }