Skip to content

Commit 2eda54f

Browse files
committed
Changed return type for function to get directory
Signed-off-by: Saurabh Kamat <[email protected]>
1 parent 68b6e5f commit 2eda54f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cmd/gz.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ void cmdVerbosity(const int _verbosity)
6767
}
6868

6969
//////////////////////////////////////////////////
70-
const char *worldInstallDir()
70+
const std::string worldInstallDir()
7171
{
7272
static std::string worldInstallDir = gz::sim::getWorldInstallDir();
73-
return worldInstallDir.c_str();
73+
return worldInstallDir;
7474
}
7575

7676
//////////////////////////////////////////////////

src/cmd/gz.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ char *simVersionHeader();
3434
/// \param[in] _verbosity 0 to 4
3535
void cmdVerbosity(const int _verbosity);
3636

37-
const char *worldInstallDir();
37+
const std::string worldInstallDir();
3838

3939
/// \brief External hook to run simulation server.
4040
/// \param[in] _sdfString SDF file to run, as a string.

0 commit comments

Comments
 (0)