Skip to content

Commit 4ea9151

Browse files
committed
remove unused code in string_constantt::to_array_expr
1 parent a904300 commit 4ea9151

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/util/string_constant.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,11 @@ array_exprt string_constantt::to_array_expr() const
5252
int ch=i==string_size-1?0:str[i];
5353

5454
if(char_is_unsigned)
55-
ch=(unsigned char)ch;
55+
ch = (unsigned char)ch;
56+
else
57+
ch = (signed char)ch;
5658

57-
exprt &op=*it;
58-
59-
op=from_integer(ch, char_type);
60-
61-
if(ch>=32 && ch<=126)
62-
{
63-
std::string ch_str="'";
64-
if(ch=='\'' || ch=='\\')
65-
ch_str+='\\';
66-
ch_str+=static_cast<char>(ch);
67-
ch_str+="'";
68-
}
59+
*it = from_integer(ch, char_type);
6960
}
7061

7162
return dest;

0 commit comments

Comments
 (0)