Skip to content

Commit 04c28f8

Browse files
authored
Update encrypt-and-decrypt-strings.cpp
1 parent 96020fb commit 04c28f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

C++/encrypt-and-decrypt-strings.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class Encrypter {
1818
string encrypt(string word1) {
1919
string result;
2020
for (const auto& c : word1) {
21-
if (!lookup_.count(c)) return "";
21+
if (!lookup_.count(c)) {
22+
return "";
23+
}
2224
result += lookup_[c];
2325
}
2426
return result;

0 commit comments

Comments
 (0)