mirror of
https://github.com/quantum5/Zalgo.git
synced 2025-04-24 13:41:57 -04:00
C++ compiler doesn't like Pythonic code.
This commit is contained in:
parent
1f1e1196ca
commit
a809e6c203
|
@ -56,12 +56,9 @@ ZalgoProcess &ZalgoProcess::zalgo(int level, bool up, bool mid, bool down) {
|
|||
std::uniform_int_distribution<> dist_mid(level / 6, level / 2);
|
||||
std::uniform_int_distribution<> dist_down(level / 3, level);
|
||||
bool initial = true;
|
||||
wint_t ch;
|
||||
|
||||
while (true) {
|
||||
wint_t ch = fgetwc(infile);
|
||||
if (ch == WEOF)
|
||||
return *this;
|
||||
|
||||
while ((ch = fgetwc(infile)) != WEOF) {
|
||||
if (ch == 0xFEFF)
|
||||
continue;
|
||||
if (ch == L'?' && initial) {
|
||||
|
@ -88,15 +85,14 @@ ZalgoProcess &ZalgoProcess::zalgo(int level, bool up, bool mid, bool down) {
|
|||
IMPLEMENT_ZALGO(mid);
|
||||
IMPLEMENT_ZALGO(down);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ZalgoProcess &ZalgoProcess::unzalgo() {
|
||||
bool initial = true;
|
||||
while (true) {
|
||||
wint_t ch = fgetwc(infile);
|
||||
if (ch == WEOF)
|
||||
return *this;
|
||||
wint_t ch;
|
||||
|
||||
while ((ch = fgetwc(infile)) != WEOF) {
|
||||
if (ch == 0xFEFF)
|
||||
continue;
|
||||
if (ch == L'?' && initial) {
|
||||
|
@ -108,6 +104,7 @@ ZalgoProcess &ZalgoProcess::unzalgo() {
|
|||
continue;
|
||||
fputwc(ch, outfile);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ZalgoProcess &ZalgoProcess::close() {
|
||||
|
|
Loading…
Reference in a new issue