mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
expose propagate created
This commit is contained in:
parent
e1ffaa7faf
commit
8ca023d541
12 changed files with 67 additions and 33 deletions
|
@ -87,12 +87,12 @@ zstring::zstring(char const* s) {
|
|||
|
||||
string_encoding zstring::get_encoding() {
|
||||
if (gparams::get_value("encoding") == "unicode")
|
||||
return unicode;
|
||||
return string_encoding::unicode;
|
||||
if (gparams::get_value("encoding") == "bmp")
|
||||
return bmp;
|
||||
return string_encoding::bmp;
|
||||
if (gparams::get_value("encoding") == "ascii")
|
||||
return ascii;
|
||||
return unicode;
|
||||
return string_encoding::ascii;
|
||||
return string_encoding::unicode;
|
||||
}
|
||||
|
||||
bool zstring::well_formed() const {
|
||||
|
|
|
@ -21,7 +21,7 @@ Author:
|
|||
#include "util/buffer.h"
|
||||
#include "util/rational.h"
|
||||
|
||||
enum string_encoding {
|
||||
enum class string_encoding {
|
||||
ascii, // exactly 8 bits
|
||||
unicode,
|
||||
bmp // basic multilingual plane; exactly 16 bits
|
||||
|
@ -41,22 +41,22 @@ public:
|
|||
static unsigned ascii_num_bits() { return 8; }
|
||||
static unsigned max_char() {
|
||||
switch (get_encoding()) {
|
||||
case unicode:
|
||||
case string_encoding::unicode:
|
||||
return unicode_max_char();
|
||||
case bmp:
|
||||
case string_encoding::bmp:
|
||||
return bmp_max_char();
|
||||
case ascii:
|
||||
case string_encoding::ascii:
|
||||
return ascii_max_char();
|
||||
}
|
||||
return unicode_max_char();
|
||||
}
|
||||
static unsigned num_bits() {
|
||||
switch (get_encoding()) {
|
||||
case unicode:
|
||||
case string_encoding::unicode:
|
||||
return unicode_num_bits();
|
||||
case bmp:
|
||||
case string_encoding::bmp:
|
||||
return bmp_num_bits();
|
||||
case ascii:
|
||||
case string_encoding::ascii:
|
||||
return ascii_num_bits();
|
||||
}
|
||||
return unicode_num_bits();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue