File tree Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -70,38 +70,3 @@ array_exprt string_constantt::to_array_expr() const
70
70
71
71
return dest;
72
72
}
73
-
74
- // / convert array constant into string
75
- // / \return true on error
76
- bool string_constantt::from_array_expr (const array_exprt &src)
77
- {
78
- id (ID_string_constant);
79
- type ()=src.type ();
80
-
81
- const typet &subtype = to_array_type (type ()).subtype ();
82
-
83
- // check subtype
84
- if (subtype!=signed_char_type () &&
85
- subtype!=unsigned_char_type ())
86
- return true ;
87
-
88
- std::string value;
89
-
90
- forall_operands (it, src)
91
- {
92
- mp_integer int_value=0 ;
93
- if (to_integer (*it, int_value))
94
- return true ;
95
- unsigned unsigned_value=integer2unsigned (int_value);
96
- value+=static_cast <char >(unsigned_value);
97
- }
98
-
99
- // Drop the implicit zero at the end.
100
- // Not clear what the semantics should be if it's not there.
101
- if (!value.empty () && value[value.size ()-1 ]==0 )
102
- value.resize (value.size ()-1 );
103
-
104
- set_value (value);
105
-
106
- return false ;
107
- }
You can’t perform that action at this time.
0 commit comments