<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=SummerOfCodeProposal_res</id>
	<title>SummerOfCodeProposal res - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=SummerOfCodeProposal_res"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;action=history"/>
	<updated>2026-05-05T22:41:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29859&amp;oldid=prev</id>
		<title>Ivanovic: added category SoC</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29859&amp;oldid=prev"/>
		<updated>2009-04-03T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;added category SoC&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:00, 3 April 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot; &gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Assuming that only a limited set of keys is used all keys can be stored in a global &amp;quot;add-only&amp;quot; pool. Individual &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; instances would only the pointers to the global keys.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Assuming that only a limited set of keys is used all keys can be stored in a global &amp;quot;add-only&amp;quot; pool. Individual &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; instances would only the pointers to the global keys.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* For values consider changing &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; to be backed by a string that is &amp;quot;copy on write&amp;quot;, so a single copy is used unless the string is manipulated. silene suggested to store short, untranslatable values inside &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; directly to use the &amp;quot;16 or 24 bytes&amp;quot; it takes up anyway.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* For values consider changing &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; to be backed by a string that is &amp;quot;copy on write&amp;quot;, so a single copy is used unless the string is manipulated. silene suggested to store short, untranslatable values inside &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; directly to use the &amp;quot;16 or 24 bytes&amp;quot; it takes up anyway.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Summer of Code]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ivanovic</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29332&amp;oldid=prev</id>
		<title>Res: /* Current status */</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29332&amp;oldid=prev"/>
		<updated>2009-03-27T13:56:18Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Current status&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 13:56, 27 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot; &gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Upon reading the blog post linked in the idea proposal my first thought was to use a proxy class for operator[]. Below a patch that implements it.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Upon reading the blog post linked in the idea proposal my first thought was to use a proxy class for operator[]. Below a patch that implements it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* I submitted a proposal via the Google SoC app. It contains some other information relevant for mentors/admins.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Proxy class patch ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Proxy class patch ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot; &gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This builds and, I believe, works, but has a number of not-so-nice issues:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This builds and, I believe, works, but has a number of not-so-nice issues:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Some places store return values in &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. The idea is to change these to &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt;, as that type should ideally behave like &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Some places store return values in &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. The idea is to change these to &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt;, as that type should ideally behave like &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; can cast to both &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;s&amp;gt;&lt;/ins&gt;&amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; can cast to both &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; where a &amp;lt;tt&amp;gt;const t_string&amp;amp;&amp;lt;/tt&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; where a &amp;lt;tt&amp;gt;const t_string&amp;amp;&amp;lt;/tt&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; is passed to methods that can take either of &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;. The ambiguity was solved in some places by using &amp;lt;tt&amp;gt;.str()&amp;lt;/tt&amp;gt;. It would also go away when &amp;lt;tt&amp;gt;proxy_string operator[]&amp;lt;/tt&amp;gt; is removed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; is passed to methods that can take either of &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;. The ambiguity was solved in some places by using &amp;lt;tt&amp;gt;.str()&amp;lt;/tt&amp;gt;. It would also go away when &amp;lt;tt&amp;gt;proxy_string operator[]&amp;lt;/tt&amp;gt; is removed&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&amp;lt;/s&amp;gt; Resolved differently, see comments on GNA&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;variables_set&amp;lt;/tt&amp;gt; class has a member (&amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt;) that returns a &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;game_state&amp;lt;/tt&amp;gt; descends from this class; it's &amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt; implementation supposedly returns a value from a &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;variables_set&amp;lt;/tt&amp;gt; class has a member (&amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt;) that returns a &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;game_state&amp;lt;/tt&amp;gt; descends from this class; it's &amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt; implementation supposedly returns a value from a &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29138&amp;oldid=prev</id>
		<title>Res: /* Next (technically, first) Steps */</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29138&amp;oldid=prev"/>
		<updated>2009-03-23T16:46:04Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Next (technically, first) Steps&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:46, 23 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Get rid of &amp;lt;tt&amp;gt;t_string&amp;amp; operator[]&amp;lt;/tt&amp;gt; - could be a proxy class, as above, or like in the initial blog post, a setter function. A way in-between could be to have the proxy class for convenient migration, but mark is a deprecated; instead, promote the usage of the setter. Cases where the proxy class actually introduces ugliness should be fixed manually.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Get rid of &amp;lt;tt&amp;gt;t_string&amp;amp; operator[]&amp;lt;/tt&amp;gt; - could be a proxy class, as above, or like in the initial blog post, a setter function. A way in-between could be to have the proxy class for convenient migration, but mark is a deprecated; instead, promote the usage of the setter. Cases where the proxy class actually introduces ugliness should be fixed manually.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Determine the &lt;/del&gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;variation&lt;/del&gt;&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in strings in configs&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;E&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;g. if only very few distinct strings occur during &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;run of the game &lt;/del&gt;string &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;deleting could be ignored and storage one-way (thus simpler). However, while I expect &lt;/del&gt;that &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;there &lt;/del&gt;is a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;set of strings which occur often (keywords)&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;there would also be lots of arbitrary strings that need proper deletion lest &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;introduce a leak&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Assuming that only a limited set of keys is used all keys can be stored in a global &lt;/ins&gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;add-only&lt;/ins&gt;&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pool&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Individual &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; instances would only the pointers to the global keys&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* For values consider changing &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; to be backed by &lt;/ins&gt;a string that is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;copy on write&amp;quot;, so &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;single copy is used unless the string is manipulated. silene suggested to store short&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;untranslatable values inside &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; directly &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;use the &amp;quot;16 or 24 bytes&amp;quot; it takes up anyway&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29136&amp;oldid=prev</id>
		<title>Res at 14:19, 23 March 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29136&amp;oldid=prev"/>
		<updated>2009-03-23T14:19:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;amp;diff=29136&amp;amp;oldid=29068&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29068&amp;oldid=prev</id>
		<title>Res at 17:37, 22 March 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29068&amp;oldid=prev"/>
		<updated>2009-03-22T17:37:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:37, 22 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; where a &amp;lt;tt&amp;gt;const t_string&amp;amp;&amp;lt;/tt&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; where a &amp;lt;tt&amp;gt;const t_string&amp;amp;&amp;lt;/tt&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; is passed to methods that can take either of &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;tt&amp;gt;config::proxy_string&amp;lt;/tt&amp;gt; is passed to methods that can take either of &amp;lt;tt&amp;gt;std::string&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. The ambiguity was solved in some places by using &amp;lt;tt&amp;gt;.str()&amp;lt;/tt&amp;gt;. It would also go away when &amp;lt;tt&amp;gt;proxy_string operator[]&amp;lt;/tt&amp;gt; is removed&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;variables_set&amp;lt;/tt&amp;gt; class has a member (&amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt;) that returns a &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;game_state&amp;lt;/tt&amp;gt; descends from this class; it's &amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt; implementation supposedly returns a value from a &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;variables_set&amp;lt;/tt&amp;gt; class has a member (&amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt;) that returns a &amp;lt;tt&amp;gt;t_string&amp;amp;&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;game_state&amp;lt;/tt&amp;gt; descends from this class; it's &amp;lt;tt&amp;gt;get_variable_const()&amp;lt;/tt&amp;gt; implementation supposedly returns a value from a &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;tt&amp;gt;t_string&amp;lt;/tt&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29040&amp;oldid=prev</id>
		<title>Res at 15:25, 22 March 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29040&amp;oldid=prev"/>
		<updated>2009-03-22T15:25:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:25, 22 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l367&quot; &gt;Line 367:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 367:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 				team_name = side_num;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 				team_name = side_num;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Next (technically, first) Steps =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Get rid of &amp;lt;tt&amp;gt;t_string&amp;amp; operator[]&amp;lt;/tt&amp;gt; - could be a proxy class, as above, or like in the initial blog post, a setter function. A way in-between could be to have the proxy class for convenient migration, but mark is a deprecated; instead, promote the usage of the setter. Cases where the proxy class actually introduces ugliness should be fixed manually.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Determine the &amp;quot;variation&amp;quot; in strings in configs. E.g. if only very few distinct strings occur during a run of the game string deleting could be ignored and storage one-way (thus simpler). However, while I expect that there is a set of strings which occur often (keywords), there would also be lots of arbitrary strings that need proper deletion lest to introduce a leak.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29034&amp;oldid=prev</id>
		<title>Res: /* Current status */</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29034&amp;oldid=prev"/>
		<updated>2009-03-22T15:18:45Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Current status&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:18, 22 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Current status =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Current status =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;* Upon reading the blog post linked in the idea proposal my first thought was to use a proxy class for operator[]. Below a patch that implements it.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Upon reading the blog post linked in the idea proposal my first thought was to use a proxy class for operator[]. Below a patch that implements it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Proxy class patch ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Proxy class patch ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This builds and, I believe, works, but has a number of not-so-nice issues:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This builds and, I believe, works, but has a number of not-so-nice issues:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Some places store return values in &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;. The idea is to change these to &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;, as that type should ideally behave like &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Some places store return values in &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;. The idea is to change these to &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;, as that type should ideally behave like &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; can cast to both &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;std::string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; and &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; can cast to both &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;std::string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; and &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first is necessary as &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; can cast to it as well; the second is necessary to&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; where a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;const t_string&amp;amp;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;support use of a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; where a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;const t_string&amp;amp;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; is expected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; is passed to methods that can take either of &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;std::string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; or &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unfortunately, this introduces an ambiguity in cases where a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;config::proxy_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; is passed to methods that can take either of &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;std::string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; or &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;variables_set&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; class has a member (&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;get_variable_const()&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;) that returns a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;. &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;game_state&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; descends from this class; it's &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;get_variable_const()&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; implementation supposedly returns a value from a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;config&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;t_string&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;variables_set&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; class has a member (&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;get_variable_const()&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;) that returns a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;amp;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;. &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;game_state&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; descends from this class; it's &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;get_variable_const()&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; implementation supposedly returns a value from a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;config&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;t_string&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt; is stored in a map. This is clearly not ideal.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29032&amp;oldid=prev</id>
		<title>Res: New page: = A bit about me =  My name is Frank Richter, currently studying Computer Sciences at the University of Jena (that's in Germany).  As far as C++ is concerned, I program in it since at leas...</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeProposal_res&amp;diff=29032&amp;oldid=prev"/>
		<updated>2009-03-22T15:13:37Z</updated>

		<summary type="html">&lt;p&gt;New page: = A bit about me =  My name is Frank Richter, currently studying Computer Sciences at the University of Jena (that&amp;#039;s in Germany).  As far as C++ is concerned, I program in it since at leas...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= A bit about me =&lt;br /&gt;
&lt;br /&gt;
My name is Frank Richter, currently studying Computer Sciences at the University of Jena (that's in Germany).&lt;br /&gt;
&lt;br /&gt;
As far as C++ is concerned, I program in it since at least seven years now. In my spare time I also develop for Crystal Space, an open source 3D engine. While I did a lot in the topics of realtime 3D, OpenGL, shaders and such, I also did (and do) 'low-level' things like cross-platform services and, last, but in this context here now certainly not least, matters of ''memory optimization''. &lt;br /&gt;
&lt;br /&gt;
= Current status =&lt;br /&gt;
&lt;br /&gt;
 * Upon reading the blog post linked in the idea proposal my first thought was to use a proxy class for operator[]. Below a patch that implements it.&lt;br /&gt;
&lt;br /&gt;
== Proxy class patch ==&lt;br /&gt;
&lt;br /&gt;
This builds and, I believe, works, but has a number of not-so-nice issues:&lt;br /&gt;
* Some places store return values in &amp;lt;pre&amp;gt;t_string&amp;amp;&amp;lt;/pre&amp;gt;. The idea is to change these to &amp;lt;pre&amp;gt;config::proxy_string&amp;lt;/pre&amp;gt;, as that type should ideally behave like &amp;lt;pre&amp;gt;t_string&amp;amp;&amp;lt;/pre&amp;gt;.&lt;br /&gt;
* &amp;lt;pre&amp;gt;config::proxy_string&amp;lt;/pre&amp;gt; can cast to both &amp;lt;pre&amp;gt;std::string&amp;lt;/pre&amp;gt; and &amp;lt;pre&amp;gt;t_string&amp;lt;/pre&amp;gt;.&lt;br /&gt;
The first is necessary as &amp;lt;pre&amp;gt;t_string&amp;lt;/pre&amp;gt; can cast to it as well; the second is necessary to&lt;br /&gt;
support use of a &amp;lt;pre&amp;gt;config::proxy_string&amp;lt;/pre&amp;gt; where a &amp;lt;pre&amp;gt;const t_string&amp;amp;&amp;lt;/pre&amp;gt; is expected.&lt;br /&gt;
Unfortunately, this introduces an ambiguity in cases where a &amp;lt;pre&amp;gt;config::proxy_string&amp;lt;/pre&amp;gt; is passed to methods that can take either of &amp;lt;pre&amp;gt;std::string&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;t_string&amp;lt;/pre&amp;gt;.&lt;br /&gt;
* the &amp;lt;pre&amp;gt;variables_set&amp;lt;/pre&amp;gt; class has a member (&amp;lt;pre&amp;gt;get_variable_const()&amp;lt;/pre&amp;gt;) that returns a &amp;lt;pre&amp;gt;t_string&amp;amp;&amp;lt;/pre&amp;gt;. &amp;lt;pre&amp;gt;game_state&amp;lt;/pre&amp;gt; descends from this class; it's &amp;lt;pre&amp;gt;get_variable_const()&amp;lt;/pre&amp;gt; implementation supposedly returns a value from a &amp;lt;pre&amp;gt;config&amp;lt;/pre&amp;gt;. To ensure the ref is valid, the value as a &amp;lt;pre&amp;gt;t_string&amp;lt;/pre&amp;gt; is stored in a map. This is clearly not ideal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Index: src/config.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/config.cpp	(revision 33970)&lt;br /&gt;
+++ src/config.cpp	(working copy)&lt;br /&gt;
@@ -293,10 +293,12 @@&lt;br /&gt;
 	delete res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
+/*&lt;br /&gt;
 t_string&amp;amp; config::operator[](const std::string&amp;amp; key)&lt;br /&gt;
 {&lt;br /&gt;
 	return values[key];&lt;br /&gt;
 }&lt;br /&gt;
+*/&lt;br /&gt;
 &lt;br /&gt;
 const t_string&amp;amp; config::operator[](const std::string&amp;amp; key) const&lt;br /&gt;
 {&lt;br /&gt;
Index: src/font.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/font.cpp	(revision 33970)&lt;br /&gt;
+++ src/font.cpp	(working copy)&lt;br /&gt;
@@ -1278,7 +1278,7 @@&lt;br /&gt;
 		known_fonts.insert(font[&amp;quot;name&amp;quot;]);&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
-	font_order = (*fonts_config)[&amp;quot;order&amp;quot;];&lt;br /&gt;
+	font_order = (*fonts_config)[&amp;quot;order&amp;quot;].t_str();&lt;br /&gt;
 	const std::vector&amp;lt;std::string&amp;gt; font_order = utils::split((*fonts_config)[&amp;quot;order&amp;quot;]);&lt;br /&gt;
 	std::vector&amp;lt;font::subset_descriptor&amp;gt; fontlist;&lt;br /&gt;
 	std::vector&amp;lt;std::string&amp;gt;::const_iterator font;&lt;br /&gt;
Index: src/playsingle_controller.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/playsingle_controller.cpp	(revision 33970)&lt;br /&gt;
+++ src/playsingle_controller.cpp	(working copy)&lt;br /&gt;
@@ -281,7 +281,7 @@&lt;br /&gt;
 		// Log before prestart events: they do weird things.&lt;br /&gt;
 		if (first_human_team_ != -1) {&lt;br /&gt;
 			log.start(gamestate_, teams_[first_human_team_], first_human_team_ + 1, units_,&lt;br /&gt;
-					  loading_game_ ? gamestate_.get_variable(&amp;quot;turn_number&amp;quot;) : &amp;quot;&amp;quot;, status_.number_of_turns());&lt;br /&gt;
+					  loading_game_ ? gamestate_.get_variable(&amp;quot;turn_number&amp;quot;).c_str() : &amp;quot;&amp;quot;, status_.number_of_turns());&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		fire_prestart(!loading_game_);&lt;br /&gt;
Index: src/gamestatus.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/gamestatus.cpp	(revision 33970)&lt;br /&gt;
+++ src/gamestatus.cpp	(working copy)&lt;br /&gt;
@@ -1166,7 +1166,7 @@&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
-t_string&amp;amp; game_state::get_variable(const std::string&amp;amp; key)&lt;br /&gt;
+config::proxy_string game_state::get_variable(const std::string&amp;amp; key)&lt;br /&gt;
 {&lt;br /&gt;
 	return variable_info(key, true, variable_info::TYPE_SCALAR).as_scalar();&lt;br /&gt;
 }&lt;br /&gt;
@@ -1174,8 +1174,9 @@&lt;br /&gt;
 const t_string&amp;amp; game_state::get_variable_const(const std::string&amp;amp; key) const&lt;br /&gt;
 {&lt;br /&gt;
 	variable_info to_get(key, false, variable_info::TYPE_SCALAR);&lt;br /&gt;
-	if(!to_get.is_valid) return temporaries[key];&lt;br /&gt;
-	return to_get.as_scalar();&lt;br /&gt;
+	config::proxy_string val ((!to_get.is_valid) ? temporaries[key] : to_get.as_scalar());&lt;br /&gt;
+	save_t_string[key] = val.t_str();&lt;br /&gt;
+	return save_t_string[key];&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 config&amp;amp; game_state::get_variable_cfg(const std::string&amp;amp; key)&lt;br /&gt;
Index: src/theme.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/theme.cpp	(revision 33970)&lt;br /&gt;
+++ src/theme.cpp	(working copy)&lt;br /&gt;
@@ -169,13 +169,13 @@&lt;br /&gt;
 			// follow the inheritance hierarchy and push all the nodes on the stack&lt;br /&gt;
 			std::vector&amp;lt;const config*&amp;gt; parent_stack(1, (*i));&lt;br /&gt;
 			const config* parent;&lt;br /&gt;
-			const t_string* parent_id = &amp;amp;((**i)[&amp;quot;inherits&amp;quot;]);&lt;br /&gt;
-			while((parent = top_cfg.find_child(&amp;quot;resolution&amp;quot;, &amp;quot;id&amp;quot;, (*parent_id))) == NULL) {&lt;br /&gt;
-				parent = top_cfg.find_child(&amp;quot;partialresolution&amp;quot;, &amp;quot;id&amp;quot;, (*parent_id));&lt;br /&gt;
+			t_string parent_id = ((**i)[&amp;quot;inherits&amp;quot;]);&lt;br /&gt;
+			while((parent = top_cfg.find_child(&amp;quot;resolution&amp;quot;, &amp;quot;id&amp;quot;, parent_id)) == NULL) {&lt;br /&gt;
+				parent = top_cfg.find_child(&amp;quot;partialresolution&amp;quot;, &amp;quot;id&amp;quot;, parent_id);&lt;br /&gt;
 				if(parent == NULL)&lt;br /&gt;
-					throw config::error(&amp;quot;[partialresolution] refers to non-existant [resolution] &amp;quot; + (*parent_id).str());&lt;br /&gt;
+					throw config::error(&amp;quot;[partialresolution] refers to non-existant [resolution] &amp;quot; + parent_id.str());&lt;br /&gt;
 				parent_stack.push_back(parent);&lt;br /&gt;
-				parent_id = &amp;amp;((*parent)[&amp;quot;inherits&amp;quot;]);&lt;br /&gt;
+				parent_id = ((*parent)[&amp;quot;inherits&amp;quot;]);&lt;br /&gt;
 			}&lt;br /&gt;
 &lt;br /&gt;
 			// Add the parent resolution and apply all the modifications of its children&lt;br /&gt;
Index: src/variable.hpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/variable.hpp	(revision 33970)&lt;br /&gt;
+++ src/variable.hpp	(working copy)&lt;br /&gt;
@@ -206,7 +206,7 @@&lt;br /&gt;
 	 * Results: after deciding the desired type, these methods can retrieve the result&lt;br /&gt;
 	 * Note: first you should force_valid or check is_valid, otherwise these may fail&lt;br /&gt;
 	 */&lt;br /&gt;
-	t_string&amp;amp; as_scalar();&lt;br /&gt;
+	config::proxy_string as_scalar();&lt;br /&gt;
 	config&amp;amp; as_container();&lt;br /&gt;
 	array_range as_array(); //range may be empty&lt;br /&gt;
 };&lt;br /&gt;
Index: src/game_config.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/game_config.cpp	(revision 33970)&lt;br /&gt;
+++ src/game_config.cpp	(working copy)&lt;br /&gt;
@@ -239,7 +239,7 @@&lt;br /&gt;
 				std::string id = (**teamC)[&amp;quot;id&amp;quot;];&lt;br /&gt;
 				std::vector&amp;lt;Uint32&amp;gt; temp = string2rgb((**teamC)[&amp;quot;rgb&amp;quot;]);&lt;br /&gt;
 				team_rgb_range.insert(std::make_pair(id,color_range(temp)));&lt;br /&gt;
-				team_rgb_name[id] = (**teamC)[&amp;quot;name&amp;quot;];&lt;br /&gt;
+				team_rgb_name[id] = (**teamC)[&amp;quot;name&amp;quot;].t_str();&lt;br /&gt;
 				//generate palette of same name;&lt;br /&gt;
 				std::vector&amp;lt;Uint32&amp;gt; tp = palette(team_rgb_range[id]);&lt;br /&gt;
 				if(tp.size()){&lt;br /&gt;
Index: src/config.hpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/config.hpp	(revision 33970)&lt;br /&gt;
+++ src/config.hpp	(working copy)&lt;br /&gt;
@@ -150,6 +150,43 @@&lt;br /&gt;
 	private:&lt;br /&gt;
 		Itor i_;&lt;br /&gt;
 	};&lt;br /&gt;
+	&lt;br /&gt;
+	class proxy_string&lt;br /&gt;
+	{&lt;br /&gt;
+	  config&amp;amp; owner;&lt;br /&gt;
+	  const std::string&amp;amp; key;&lt;br /&gt;
+	  &lt;br /&gt;
+	  t_string&amp;amp; real_str() { return owner.values[key]; }&lt;br /&gt;
+	  const t_string&amp;amp; real_str() const { return owner.values[key]; }&lt;br /&gt;
+	public:&lt;br /&gt;
+	  proxy_string (config&amp;amp; owner, const std::string&amp;amp; key) : owner (owner), key (key) {}&lt;br /&gt;
+	&lt;br /&gt;
+	  proxy_string&amp;amp; operator= (const proxy_string&amp;amp; other)&lt;br /&gt;
+	  { return this-&amp;gt;operator= (other.real_str()); }&lt;br /&gt;
+	    &lt;br /&gt;
+	  proxy_string&amp;amp; operator= (const char* str)&lt;br /&gt;
+	  { real_str() = str; return *this; }&lt;br /&gt;
+	  proxy_string&amp;amp; operator= (const t_string&amp;amp; str)&lt;br /&gt;
+	  { real_str() = str; return *this; }&lt;br /&gt;
+	  proxy_string&amp;amp; operator= (const std::string&amp;amp; str)&lt;br /&gt;
+	  { real_str() = str; return *this; }&lt;br /&gt;
+	  &lt;br /&gt;
+	  proxy_string&amp;amp; operator+= (const std::string&amp;amp; str)&lt;br /&gt;
+	  { real_str() += str; return *this; }&lt;br /&gt;
+	  &lt;br /&gt;
+	  // t_string 'emulation' methods&lt;br /&gt;
+	  bool empty() const { return real_str().empty(); }&lt;br /&gt;
+	  const char* c_str() const { return real_str().c_str(); }&lt;br /&gt;
+	  std::string to_serialized() const { return real_str().to_serialized(); }&lt;br /&gt;
+	  &lt;br /&gt;
+	  const std::string&amp;amp; str() const { return real_str().str(); }&lt;br /&gt;
+	  const t_string&amp;amp; t_str() const { return real_str(); }&lt;br /&gt;
+	  operator std::string () const { return real_str().str(); }&lt;br /&gt;
+	  operator t_string() const { return real_str(); }&lt;br /&gt;
+	  &lt;br /&gt;
+	  inline friend std::ostream&amp;amp; operator&amp;lt;&amp;lt;(std::ostream&amp;amp; os, const proxy_string&amp;amp; str)&lt;br /&gt;
+	  { return os &amp;lt;&amp;lt; str.real_str(); }&lt;br /&gt;
+	};&lt;br /&gt;
 &lt;br /&gt;
 	typedef std::pair&amp;lt;const_attribute_iterator,const_attribute_iterator&amp;gt; const_attr_itors;&lt;br /&gt;
 &lt;br /&gt;
@@ -167,7 +204,10 @@&lt;br /&gt;
 	config&amp;amp; add_child(const std::string&amp;amp; key);&lt;br /&gt;
 	config&amp;amp; add_child(const std::string&amp;amp; key, const config&amp;amp; val);&lt;br /&gt;
 	config&amp;amp; add_child_at(const std::string&amp;amp; key, const config&amp;amp; val, size_t index);&lt;br /&gt;
-	t_string&amp;amp; operator[](const std::string&amp;amp; key);&lt;br /&gt;
+	&lt;br /&gt;
+	//t_string&amp;amp; operator[](const std::string&amp;amp; key);&lt;br /&gt;
+	proxy_string operator[](const std::string&amp;amp; key)&lt;br /&gt;
+	{ return proxy_string (*this, key); }&lt;br /&gt;
 	const t_string&amp;amp; operator[](const std::string&amp;amp; key) const;&lt;br /&gt;
 &lt;br /&gt;
 	const t_string&amp;amp; get_attribute(const std::string&amp;amp; key) const;&lt;br /&gt;
Index: src/game_events.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/game_events.cpp	(revision 33970)&lt;br /&gt;
+++ src/game_events.cpp	(working copy)&lt;br /&gt;
@@ -88,10 +88,10 @@&lt;br /&gt;
 	class pump_manager {&lt;br /&gt;
 		public:&lt;br /&gt;
 		pump_manager() :&lt;br /&gt;
-			x1_(state_of_game-&amp;gt;get_variable(&amp;quot;x1&amp;quot;)),&lt;br /&gt;
-			x2_(state_of_game-&amp;gt;get_variable(&amp;quot;x2&amp;quot;)),&lt;br /&gt;
-			y1_(state_of_game-&amp;gt;get_variable(&amp;quot;y1&amp;quot;)),&lt;br /&gt;
-			y2_(state_of_game-&amp;gt;get_variable(&amp;quot;y2&amp;quot;))&lt;br /&gt;
+			x1_(state_of_game-&amp;gt;get_variable(&amp;quot;x1&amp;quot;).str()),&lt;br /&gt;
+			x2_(state_of_game-&amp;gt;get_variable(&amp;quot;x2&amp;quot;).str()),&lt;br /&gt;
+			y1_(state_of_game-&amp;gt;get_variable(&amp;quot;y1&amp;quot;).str()),&lt;br /&gt;
+			y2_(state_of_game-&amp;gt;get_variable(&amp;quot;y2&amp;quot;).str())&lt;br /&gt;
 		{&lt;br /&gt;
 			++instance_count;&lt;br /&gt;
 		}&lt;br /&gt;
@@ -856,7 +856,7 @@&lt;br /&gt;
 &lt;br /&gt;
 	static void store_gold_side(bool store_side, const vconfig&amp;amp; cfg)&lt;br /&gt;
 	{&lt;br /&gt;
-		t_string *gold_store;&lt;br /&gt;
+		config::proxy_string *gold_store = 0;&lt;br /&gt;
 		std::string side = cfg[&amp;quot;side&amp;quot;];&lt;br /&gt;
 		std::string var_name = cfg[&amp;quot;variable&amp;quot;];&lt;br /&gt;
 		if(var_name.empty()) {&lt;br /&gt;
@@ -882,11 +882,12 @@&lt;br /&gt;
 				state_of_game-&amp;gt;get_variable(var_name+&amp;quot;.user_team_name&amp;quot;) = (*teams)[team_index].user_team_name();&lt;br /&gt;
 				state_of_game-&amp;gt;get_variable(var_name+&amp;quot;.colour&amp;quot;) = (*teams)[team_index].map_colour_to();&lt;br /&gt;
 &lt;br /&gt;
-				gold_store = &amp;amp;state_of_game-&amp;gt;get_variable(var_name+&amp;quot;.gold&amp;quot;);&lt;br /&gt;
+				gold_store = new config::proxy_string (state_of_game-&amp;gt;get_variable(var_name+&amp;quot;.gold&amp;quot;));&lt;br /&gt;
 			} else {&lt;br /&gt;
-				gold_store = &amp;amp;state_of_game-&amp;gt;get_variable(var_name);&lt;br /&gt;
+				gold_store = new config::proxy_string (state_of_game-&amp;gt;get_variable(var_name));&lt;br /&gt;
 			}&lt;br /&gt;
 			*gold_store = lexical_cast_default&amp;lt;std::string&amp;gt;((*teams)[team_index].gold(),&amp;quot;&amp;quot;);&lt;br /&gt;
+			delete gold_store;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
@@ -1158,7 +1159,7 @@&lt;br /&gt;
 		assert(state_of_game != NULL);&lt;br /&gt;
 &lt;br /&gt;
 		const std::string name = cfg[&amp;quot;name&amp;quot;];&lt;br /&gt;
-		t_string&amp;amp; var = state_of_game-&amp;gt;get_variable(name);&lt;br /&gt;
+		config::proxy_string var = state_of_game-&amp;gt;get_variable(name);&lt;br /&gt;
 &lt;br /&gt;
 		const t_string&amp;amp; literal = cfg.get_attribute(&amp;quot;literal&amp;quot;);	// no $var substitution&lt;br /&gt;
 		if(literal.empty() == false) {&lt;br /&gt;
@@ -1191,7 +1192,7 @@&lt;br /&gt;
 &lt;br /&gt;
 		const std::string multiply = cfg[&amp;quot;multiply&amp;quot;];&lt;br /&gt;
 		if(multiply.empty() == false) {&lt;br /&gt;
-			if(isint(var) &amp;amp;&amp;amp; isint(multiply)) {&lt;br /&gt;
+			if(isint(var.str()) &amp;amp;&amp;amp; isint(multiply)) {&lt;br /&gt;
 				var = str_cast( std::atoi(var.c_str()) * std::atoi(multiply.c_str()) );&lt;br /&gt;
 			} else {&lt;br /&gt;
 				var = str_cast( std::atof(var.c_str()) * std::atof(multiply.c_str()) );&lt;br /&gt;
@@ -1204,7 +1205,7 @@&lt;br /&gt;
 				ERR_NG &amp;lt;&amp;lt; &amp;quot;division by zero on variable &amp;quot; &amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
 				return;&lt;br /&gt;
 			}&lt;br /&gt;
-			if(isint(var) &amp;amp;&amp;amp; isint(divide)) {&lt;br /&gt;
+			if(isint(var.str()) &amp;amp;&amp;amp; isint(divide)) {&lt;br /&gt;
 				var = str_cast( std::atoi(var.c_str()) / std::atoi(divide.c_str()) );&lt;br /&gt;
 			} else {&lt;br /&gt;
 				var = str_cast( std::atof(var.c_str()) / std::atof(divide.c_str()) );&lt;br /&gt;
@@ -1217,7 +1218,7 @@&lt;br /&gt;
 				ERR_NG &amp;lt;&amp;lt; &amp;quot;division by zero on variable &amp;quot; &amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
 				return;&lt;br /&gt;
 			}&lt;br /&gt;
-			if(isint(var) &amp;amp;&amp;amp; isint(modulo)) {&lt;br /&gt;
+			if(isint(var.str()) &amp;amp;&amp;amp; isint(modulo)) {&lt;br /&gt;
 				var = str_cast( std::atoi(var.c_str()) % std::atoi(modulo.c_str()) );&lt;br /&gt;
 			} else {&lt;br /&gt;
 				double value = std::fmod( std::atof(var.c_str()), std::atof(modulo.c_str()) );&lt;br /&gt;
Index: src/gui/dialogs/addon_list.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/gui/dialogs/addon_list.cpp	(revision 33970)&lt;br /&gt;
+++ src/gui/dialogs/addon_list.cpp	(working copy)&lt;br /&gt;
@@ -74,10 +74,10 @@&lt;br /&gt;
 		item[&amp;quot;label&amp;quot;] = tmp;&lt;br /&gt;
 		data.insert(std::make_pair(&amp;quot;author&amp;quot;, item));&lt;br /&gt;
 &lt;br /&gt;
-		item[&amp;quot;label&amp;quot;] = (**itor)[&amp;quot;downloads&amp;quot;];&lt;br /&gt;
+		item[&amp;quot;label&amp;quot;] = (**itor)[&amp;quot;downloads&amp;quot;].t_str();&lt;br /&gt;
 		data.insert(std::make_pair(&amp;quot;downloads&amp;quot;, item));&lt;br /&gt;
 &lt;br /&gt;
-		item[&amp;quot;label&amp;quot;] = (**itor)[&amp;quot;size&amp;quot;];&lt;br /&gt;
+		item[&amp;quot;label&amp;quot;] = (**itor)[&amp;quot;size&amp;quot;].t_str();&lt;br /&gt;
 		data.insert(std::make_pair(&amp;quot;size&amp;quot;, item));&lt;br /&gt;
 &lt;br /&gt;
 		list-&amp;gt;add_row(data);&lt;br /&gt;
Index: src/unit_types.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/unit_types.cpp	(revision 33970)&lt;br /&gt;
+++ src/unit_types.cpp	(working copy)&lt;br /&gt;
@@ -791,8 +791,8 @@&lt;br /&gt;
         build_created(cfg, mv_types, races, traits);&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
-	type_name_ = cfg_[&amp;quot;name&amp;quot;];&lt;br /&gt;
-	description_ = cfg_[&amp;quot;description&amp;quot;];&lt;br /&gt;
+	type_name_ = cfg_[&amp;quot;name&amp;quot;].t_str();&lt;br /&gt;
+	description_ = cfg_[&amp;quot;description&amp;quot;].t_str();&lt;br /&gt;
 	hitpoints_ = lexical_cast_default&amp;lt;int&amp;gt;(cfg[&amp;quot;hitpoints&amp;quot;], 1);&lt;br /&gt;
 	level_ = lexical_cast_default&amp;lt;int&amp;gt;(cfg[&amp;quot;level&amp;quot;], 0);&lt;br /&gt;
 	movement_ = lexical_cast_default&amp;lt;int&amp;gt;(cfg[&amp;quot;movement&amp;quot;], 1);&lt;br /&gt;
Index: src/gamestatus.hpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/gamestatus.hpp	(revision 33970)&lt;br /&gt;
+++ src/gamestatus.hpp	(working copy)&lt;br /&gt;
@@ -120,7 +120,7 @@&lt;br /&gt;
 &lt;br /&gt;
 	// Variable access&lt;br /&gt;
 &lt;br /&gt;
-	t_string&amp;amp; get_variable(const std::string&amp;amp; varname);&lt;br /&gt;
+	config::proxy_string get_variable(const std::string&amp;amp; varname);&lt;br /&gt;
 	virtual const t_string&amp;amp; get_variable_const(const std::string&amp;amp; varname) const;&lt;br /&gt;
 	config&amp;amp; get_variable_cfg(const std::string&amp;amp; varname);&lt;br /&gt;
 	variable_info::array_range get_variable_cfgs(const std::string&amp;amp; varname);&lt;br /&gt;
@@ -165,6 +165,7 @@&lt;br /&gt;
   rand_rng::simple_rng rng_ ;&lt;br /&gt;
 	config variables;&lt;br /&gt;
 	mutable config temporaries; // lengths of arrays, etc.&lt;br /&gt;
+	mutable string_map save_t_string;&lt;br /&gt;
 	const rand_rng::set_random_generator generator_setter; /**&amp;lt; Make sure that rng is initialized first */&lt;br /&gt;
 	friend struct variable_info;&lt;br /&gt;
 };&lt;br /&gt;
Index: src/variable.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/variable.cpp	(revision 33970)&lt;br /&gt;
+++ src/variable.cpp	(working copy)&lt;br /&gt;
@@ -713,7 +713,7 @@&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
-t_string&amp;amp; variable_info::as_scalar() {&lt;br /&gt;
+config::proxy_string variable_info::as_scalar() {&lt;br /&gt;
 	assert(is_valid);&lt;br /&gt;
 	return (*vars)[key];&lt;br /&gt;
 }&lt;br /&gt;
Index: src/multiplayer_connect.cpp&lt;br /&gt;
===================================================================&lt;br /&gt;
--- src/multiplayer_connect.cpp	(revision 33970)&lt;br /&gt;
+++ src/multiplayer_connect.cpp	(working copy)&lt;br /&gt;
@@ -1439,8 +1439,8 @@&lt;br /&gt;
 		int side_num = 1;&lt;br /&gt;
 		foreach (config &amp;amp;side, sides)&lt;br /&gt;
 		{&lt;br /&gt;
-			t_string &amp;amp;team_name = side[&amp;quot;team_name&amp;quot;];&lt;br /&gt;
-			t_string &amp;amp;user_team_name = side[&amp;quot;user_team_name&amp;quot;];&lt;br /&gt;
+			config::proxy_string team_name = side[&amp;quot;team_name&amp;quot;];&lt;br /&gt;
+			config::proxy_string user_team_name = side[&amp;quot;user_team_name&amp;quot;];&lt;br /&gt;
 &lt;br /&gt;
 			if(team_name.empty())&lt;br /&gt;
 				team_name = lexical_cast&amp;lt;std::string&amp;gt;(side_num);&lt;br /&gt;
@@ -1465,7 +1465,7 @@&lt;br /&gt;
 		foreach (config &amp;amp;side, sides)&lt;br /&gt;
 		{&lt;br /&gt;
 			const std::string side_num = lexical_cast&amp;lt;std::string&amp;gt;(_side_num);&lt;br /&gt;
-			t_string &amp;amp;team_name = side[&amp;quot;team_name&amp;quot;];&lt;br /&gt;
+			config::proxy_string team_name = side[&amp;quot;team_name&amp;quot;];&lt;br /&gt;
 &lt;br /&gt;
 			if(team_name.empty())&lt;br /&gt;
 				team_name = side_num;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Res</name></author>
		
	</entry>
</feed>