Skip to content

Commit

Permalink
App: add PropertyFileIncluded::setValue() for std::string
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed May 27, 2024
1 parent 530787c commit 4d2a022
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/App/PropertyFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void PropertyFileIncluded::setValue(const char* sFile, const char* sName)
}

// if a special name given, use this instead
if (sName) {
if (sName && sName[0] != '\0') {
Base::FileInfo fi(pathTrans + "/" + sName);
if (fi.exists()) {
// if a file with this name already exists search for a new one
Expand Down
3 changes: 3 additions & 0 deletions src/App/PropertyFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class AppExport PropertyFileIncluded : public Property
~PropertyFileIncluded() override;

void setValue(const char* sFile, const char* sName=nullptr);
void setValue(const std::string &sFile) {
setValue(sFile.c_str());
}
const char* getValue() const;

const char* getEditorName() const override
Expand Down

0 comments on commit 4d2a022

Please sign in to comment.