Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
gralkapk committed Nov 8, 2023
1 parent 406396f commit 48c52c8
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 22 deletions.
3 changes: 1 addition & 2 deletions plugins/datatools/src/io/MMGDDWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ void io::MMGDDWriter::release() {

bool io::MMGDDWriter::run() {
using megamol::core::utility::log::Log;
vislib::TString filename(
this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
vislib::TString filename(this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
if (filename.IsEmpty()) {
Log::DefaultLog.WriteError("No file name specified. Abort.");
return false;
Expand Down
3 changes: 1 addition & 2 deletions plugins/datatools/src/table/MMFTDataWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ bool MMFTDataWriter::run() {
}

if (std::filesystem::exists(filename)) {
Log::DefaultLog.WriteWarn(
"File %s already exists and will be overwritten.", filename.generic_string().c_str());
Log::DefaultLog.WriteWarn("File %s already exists and will be overwritten.", filename.generic_string().c_str());
}

std::ofstream file(filename, std::ios::binary);
Expand Down
3 changes: 1 addition & 2 deletions plugins/moldyn/src/io/MMPGDWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ bool MMPGDWriter::run() {
}

if (vislib::sys::File::Exists(filename.native().c_str())) {
Log::DefaultLog.WriteWarn(
"File %s already exists and will be overwritten.", filename.generic_string().c_str());
Log::DefaultLog.WriteWarn("File %s already exists and will be overwritten.", filename.generic_string().c_str());
}

vislib::math::Cuboid<float> bbox;
Expand Down
3 changes: 1 addition & 2 deletions plugins/moldyn/src/io/MMPLDWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ void MMPLDWriter::release() {}
*/
bool MMPLDWriter::run() {
using megamol::core::utility::log::Log;
vislib::TString filename(
this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
vislib::TString filename(this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
if (filename.IsEmpty()) {
Log::DefaultLog.WriteError("No file name specified. Abort.");
return false;
Expand Down
3 changes: 1 addition & 2 deletions plugins/moldyn/src/io/SIFFWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ bool SIFFWriter::run() {
}

if (vislib::sys::File::Exists(filename.native().c_str())) {
Log::DefaultLog.WriteWarn(
"File %s already exists and will be overwritten.", filename.generic_string().c_str());
Log::DefaultLog.WriteWarn("File %s already exists and will be overwritten.", filename.generic_string().c_str());
}

mpdc->SetFrameID(0, true);
Expand Down
9 changes: 3 additions & 6 deletions plugins/protein/src/PDBLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,7 @@ bool PDBLoader::getData(core::Call& call) {
this->pdbFilenameSlot.ResetDirty();
this->solventResidues.ResetDirty();
this->loadFile(this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value());
this->pdbfilename =
this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str();
this->pdbfilename = this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str();
}

dc->SetDataHash(this->datahash);
Expand Down Expand Up @@ -979,16 +978,14 @@ bool PDBLoader::getExtent(core::Call& call) {

if (this->capFilenameSlot.IsDirty()) {
this->capFilenameSlot.ResetDirty();
this->loadFileCap(
this->capFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
this->loadFileCap(this->capFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
}

if (this->pdbFilenameSlot.IsDirty() || this->solventResidues.IsDirty()) {
this->pdbFilenameSlot.ResetDirty();
this->solventResidues.ResetDirty();
this->loadFile(this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
this->pdbfilename =
this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str();
this->pdbfilename = this->pdbFilenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str();
}

dc->SetPDBFilename(this->pdbfilename);
Expand Down
3 changes: 1 addition & 2 deletions plugins/protein/src/VTILoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ bool VTILoader::getExtent(core::Call& call) {
// Check parameters
if (this->filenameSlot.IsDirty()) { // Files have to be loaded first
this->filenameSlot.ResetDirty();
if (!this->loadFile(
this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str())) {
if (!this->loadFile(this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str())) {
printf("Loading file failed");
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions plugins/protein/src/VTKLegacyDataLoaderUnstructuredGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ bool VTKLegacyDataLoaderUnstructuredGrid::getExtent(core::Call& call) {
// Check parameters
if (this->filenameSlot.IsDirty()) { // Files have to be loaded first
this->filenameSlot.ResetDirty();
if (!this->loadFile(
this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str())) {
if (!this->loadFile(this->filenameSlot.Param<core::param::FilePathParam>()->Value().generic_string().c_str())) {
printf("Loading file failed");
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions plugins/volume/src/VolumetricDataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ bool megamol::volume::VolumetricDataSource::onFileNameChanged(core::param::Param
}

/* Read the header. */
vislib::StringA fileName(
this->paramFileName.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
vislib::StringA fileName(this->paramFileName.Param<core::param::FilePathParam>()->Value().generic_string().c_str());
if (::datRaw_readHeader(fileName.PeekBuffer(), this->fileInfo, nullptr) != FALSE) {
Log::DefaultLog.WriteInfo(_T("Successfully loaded dat file %hs."), fileName.PeekBuffer());

Expand Down

0 comments on commit 48c52c8

Please sign in to comment.