* prefer "constant string" -> pwidechar for {$modeswitch unicodestrings}

* prefer "constant char" -> pchar to "constant char" -> pwidechar, and
    "constant widechar" -> pwidechar to "constant widechar" -> pchar

git-svn-id: branches/cpstrrtl@24997 -
This commit is contained in:
Jonas Maebe 2013-06-27 21:38:02 +00:00
parent c49ae76837
commit eb93429cf0

View File

@ -1140,7 +1140,10 @@ implementation
(is_pchar(def_to) or is_pwidechar(def_to)) then
begin
doconv:=tc_cstring_2_pchar;
eq:=te_convert_l2;
if is_pwidechar(def_to)=(m_default_unicodestring in current_settings.modeswitches) then
eq:=te_convert_l2
else
eq:=te_convert_l3
end
else
if (cdo_explicit in cdoptions) or (fromtreetype = arrayconstructorn) then
@ -1171,7 +1174,10 @@ implementation
(is_pchar(def_to) or is_pwidechar(def_to)) then
begin
doconv:=tc_cchar_2_pchar;
eq:=te_convert_l1;
if is_char(def_from)=is_pchar(def_to) then
eq:=te_convert_l1
else
eq:=te_convert_l2
end
else
if (m_delphi in current_settings.modeswitches) and is_integer(def_from) then