Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some const-away casts from DB #25041

Merged
merged 4 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions OnlineDB/EcalCondDB/interface/IODConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept
std::cout << "Populating the Clob using writeBuffer(Stream) method" << std::endl;
std::cout<<"we are here0"<<std::endl;

char *file = (char *)fname.c_str();
const char *file = fname.c_str();
std::cout<<"we are here0.5 file is:"<<fname<<std::endl;

std::ifstream inFile;
Expand All @@ -99,7 +99,7 @@ void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept
inFile.close();

std::string fname2="/nfshome0/ecaldev/francesca/null_file.txt";
inFile.open((char*)fname2.c_str(),std::ios::in);
inFile.open(fname2.c_str(),std::ios::in);



Expand Down
2 changes: 1 addition & 1 deletion OnlineDB/EcalCondDB/src/LMFColor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bool LMFColor::isValid() {
boost::ptr_list<LMFUnique>::const_iterator e = listOfValidColors.end();
bool ret = false;
while (i != e) {
LMFColor *c = (LMFColor*)&(*i);
const LMFColor *c = static_cast<const LMFColor*>(&(*i));
if (c->getShortName() == getShortName()) {
ret = true;
i = e;
Expand Down
12 changes: 6 additions & 6 deletions OnlineDB/EcalCondDB/src/LMFDefFabric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFColor *c = (LMFColor*)&(*i);
const LMFColor *c = static_cast<const LMFColor*>(&(*i));
_lmfColors.push_back(*c);
i++;
}
Expand All @@ -191,7 +191,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFTrigType *c = (LMFTrigType*)&(*i);
const LMFTrigType *c = static_cast<const LMFTrigType*>(&(*i));
_lmfTrigTypes.push_back(*c);
i++;
}
Expand All @@ -200,7 +200,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFRunTag *c = (LMFRunTag*)&(*i);
const LMFRunTag *c = static_cast<const LMFRunTag*>(&(*i));
_lmfRunTags.push_back(*c);
i++;
}
Expand All @@ -209,7 +209,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFPrimVers *c = (LMFPrimVers*)&(*i);
const LMFPrimVers *c = static_cast<const LMFPrimVers*>(&(*i));
_lmfPrimVersions.push_back(*c);
i++;
}
Expand All @@ -218,7 +218,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFCorrVers *c = (LMFCorrVers*)&(*i);
const LMFCorrVers *c = static_cast<const LMFCorrVers*>(&(*i));
_lmfCorrVersions.push_back(*c);
i++;
}
Expand All @@ -227,7 +227,7 @@ void LMFDefFabric::initialize()
i = listOfObjects.begin();
e = listOfObjects.end();
while (i != e) {
LMFSeqVers *c = (LMFSeqVers*)&(*i);
const LMFSeqVers *c = static_cast<const LMFSeqVers*>(&(*i));
_lmfSeqVersions.push_back(*c);
i++;
}
Expand Down
5 changes: 2 additions & 3 deletions OnlineDB/EcalCondDB/src/MODCCSHFDat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,17 @@ void MODCCSHFDat::populateClob (Clob &clob, std::string fname, unsigned int clob
cout << "Populating the Clob using writeBuffer(Stream) method" << endl;
std::cout<<"we are here0"<<std::endl;

char *file = (char *)fname.c_str();
std::cout<<"we are here0.5 file is:"<<fname<<std::endl;

ifstream inFile;
inFile.open(file,ios::in);
inFile.open(fname.c_str(),ios::in);
if (!inFile)
{
cout << fname<<" file not found\n";
inFile.close();

std::string fname2="/u1/fra/null_file.txt";
inFile.open((char*)fname2.c_str(),ios::in);
inFile.open(fname2.c_str(),ios::in);



Expand Down