Created
September 20, 2020 19:31
-
-
Save atimin/c8b2f77c44c5e200819e14fa34d13910 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
public: | |
A() { is_valid_ = Init(); }; | |
void Foo() { | |
if (!is_valid_) { | |
is_valid_ = Init() | |
} | |
// do work | |
} | |
private: | |
bool Init() { /* get some resources */ } | |
bool is_valid_ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment