Skip to content

Commit

Permalink
Proper C++ singletons
Browse files Browse the repository at this point in the history
  • Loading branch information
CodaFi committed May 2, 2013
1 parent 6d1f895 commit d2b6824
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/core/provider/MCMailProvidersManager.cc
Expand Up @@ -17,6 +17,10 @@ void MailProvidersManager::init()
mProviders = new HashMap();
}

MailProvidersManager::MailProvidersManager() {
init();
}

MailProvider * MailProvidersManager::providerForEmail(String * email)
{
mc_foreachdictionaryValue(MailProvider, provider, mProviders) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/provider/MCMailProvidersManager.h
Expand Up @@ -34,7 +34,7 @@ namespace mailcore {
void registerProvidersFilename(String * filename);

private:
MailProvidersManager() {};
MailProvidersManager();
MailProvidersManager(MailProvidersManager const&);
void operator=(MailProvidersManager const&);

Expand Down
2 changes: 1 addition & 1 deletion tests/test-all.mm
Expand Up @@ -358,7 +358,7 @@ void testAll()
//testAsyncPOP();
//testAddresses();
//testAttachments();
testProviders();
//testProviders();
testObjC();

MCLog("pool release");
Expand Down

0 comments on commit d2b6824

Please sign in to comment.