Commit 17910faa authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

made the AuthSrv constructor exception-safe

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent cc51fbdc
......@@ -71,20 +71,18 @@ public:
AuthSrvImpl::AuthSrvImpl() {
AuthSrv::AuthSrv() {
impl_ = new AuthSrvImpl;
// set empty (sqlite) data source, once ccsession is up
// cur_datasrc_ is automatically initialized by the default constructor,
// effectively being an empty (sqlite) data source. once ccsession is up
// the datasource will be set by the configuration setting
// (or the default one if none is set)
impl_->cur_datasrc_ = ConstDataSrcPtr();
// add static data source
impl_->data_sources_.addDataSrc(ConstDataSrcPtr(new StaticDataSrc));
data_sources_.addDataSrc(ConstDataSrcPtr(new StaticDataSrc));
AuthSrv::AuthSrv() : impl_(new AuthSrvImpl) {}
AuthSrv::~AuthSrv() {
delete impl_;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment