bootstrap.cxx (b597708b) | bootstrap.cxx (22076bf1) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 27 unchanged lines hidden (view full) --- 36#include <rtl/alloc.h> 37#include <rtl/string.hxx> 38#include <rtl/ustrbuf.hxx> 39#include <rtl/ustring.hxx> 40#include <rtl/byteseq.hxx> 41#include <rtl/instance.hxx> 42#include <rtl/malformeduriexception.hxx> 43#include <rtl/uri.hxx> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 27 unchanged lines hidden (view full) --- 36#include <rtl/alloc.h> 37#include <rtl/string.hxx> 38#include <rtl/ustrbuf.hxx> 39#include <rtl/ustring.hxx> 40#include <rtl/byteseq.hxx> 41#include <rtl/instance.hxx> 42#include <rtl/malformeduriexception.hxx> 43#include <rtl/uri.hxx> |
44#include "rtl/allocator.hxx" | |
45 46#include "macro.hxx" 47 48#include <hash_map> 49#include <list> 50 51#define MY_STRING_(x) # x 52#define MY_STRING(x) MY_STRING_(x) --- 76 unchanged lines hidden (view full) --- 129 {} 130 inline rtl_bootstrap_NameValue( 131 OUString const & name, OUString const & value ) SAL_THROW( () ) 132 : sName( name ), 133 sValue( value ) 134 {} 135}; 136 | 44 45#include "macro.hxx" 46 47#include <hash_map> 48#include <list> 49 50#define MY_STRING_(x) # x 51#define MY_STRING(x) MY_STRING_(x) --- 76 unchanged lines hidden (view full) --- 128 {} 129 inline rtl_bootstrap_NameValue( 130 OUString const & name, OUString const & value ) SAL_THROW( () ) 131 : sName( name ), 132 sValue( value ) 133 {} 134}; 135 |
137typedef std::list< 138 rtl_bootstrap_NameValue, 139 rtl::Allocator< rtl_bootstrap_NameValue > 140> NameValueList; | 136typedef std::list<rtl_bootstrap_NameValue> NameValueList; |
141 142bool find( 143 NameValueList const & list, rtl::OUString const & key, 144 rtl::OUString * value) 145{ 146 OSL_ASSERT(value != NULL); 147 for (NameValueList::const_iterator i(list.begin()); i != list.end(); ++i) { 148 if (i->sName == key) { --- 451 unchanged lines hidden (view full) --- 600} 601 602//---------------------------------------------------------------------------- 603//---------------------------------------------------------------------------- 604 605namespace { 606 607struct bootstrap_map { | 137 138bool find( 139 NameValueList const & list, rtl::OUString const & key, 140 rtl::OUString * value) 141{ 142 OSL_ASSERT(value != NULL); 143 for (NameValueList::const_iterator i(list.begin()); i != list.end(); ++i) { 144 if (i->sName == key) { --- 451 unchanged lines hidden (view full) --- 596} 597 598//---------------------------------------------------------------------------- 599//---------------------------------------------------------------------------- 600 601namespace { 602 603struct bootstrap_map { |
608 typedef std::hash_map< 609 rtl::OUString, Bootstrap_Impl *, 610 rtl::OUStringHash, std::equal_to< rtl::OUString >, 611 rtl::Allocator< OUString > > t; | 604 typedef std::hash_map< const rtl::OUString, Bootstrap_Impl*, rtl::OUStringHash > t; |
612 613 // get and release must only be called properly synchronized via some mutex 614 // (e.g., osl::Mutex::getGlobalMutex()): 615 616 static t * get() { 617 if (m_map == NULL) { 618 m_map = new t; 619 } --- 434 unchanged lines hidden --- | 605 606 // get and release must only be called properly synchronized via some mutex 607 // (e.g., osl::Mutex::getGlobalMutex()): 608 609 static t * get() { 610 if (m_map == NULL) { 611 m_map = new t; 612 } --- 434 unchanged lines hidden --- |