Skip to content

Commit

Permalink
Remove useless forward declarations
Browse files Browse the repository at this point in the history
Instead move the 'static' keyword to the function implementation.
  • Loading branch information
thomasjfox committed Jan 8, 2015
1 parent 2375f1c commit 9657754
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tools/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,20 @@

#include "../cli/filelister.h"

static std::string builddir(std::string filename);
static std::string objfile(std::string cppfile);
static void getDeps(const std::string &filename, std::vector<std::string> &depfiles);


std::string builddir(std::string filename)
static std::string builddir(std::string filename)
{
if (filename.compare(0,4,"lib/") == 0)
filename = "$(SRCDIR)" + filename.substr(3);
return filename;
}

std::string objfile(std::string cppfile)
static std::string objfile(std::string cppfile)
{
cppfile.erase(cppfile.rfind("."));
return builddir(cppfile + ".o");
}

void getDeps(const std::string &filename, std::vector<std::string> &depfiles)
static void getDeps(const std::string &filename, std::vector<std::string> &depfiles)
{
// Is the dependency already included?
if (std::find(depfiles.begin(), depfiles.end(), filename) != depfiles.end())
Expand Down

0 comments on commit 9657754

Please sign in to comment.