Skip to content

Commit

Permalink
Merge pull request #30800 from ZhilkinSerg/fix-missing-declaration-er…
Browse files Browse the repository at this point in the history
…rors

Make free functions static to suppress missing declarations errors
  • Loading branch information
ZhilkinSerg authored May 24, 2019
2 parents 58fdd83 + fbc616a commit d1a2d23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/chkjson/chkjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "json.h"

// copypasta: file_finder.cpp
std::vector<std::string> get_files_from_path(std::string extension, std::string root_path, bool recursive_search, bool match_extension)
static std::vector<std::string> get_files_from_path(std::string extension, std::string root_path, bool recursive_search, bool match_extension)
{
std::vector<std::string> files;
const size_t extsz = extension.size();
Expand Down Expand Up @@ -90,15 +90,15 @@ std::vector<std::string> get_files_from_path(std::string extension, std::string
}

// copypasta: init.cpp
void load_object(JsonObject &jo)
static void load_object(JsonObject &jo)
{
std::string type = jo.get_string("type");
if ( ! jo.has_string("type") )
{
jo.throw_error( "JSON object has no type" );
}
}
void load_all_from_json(JsonIn &jsin)
static void load_all_from_json(JsonIn &jsin)
{
char ch;
jsin.eat_whitespace();
Expand Down Expand Up @@ -141,7 +141,7 @@ void load_all_from_json(JsonIn &jsin)
}
}

void load_json_dir(const std::string &dirname)
static void load_json_dir(const std::string &dirname)
{
// get a list of all files in the directory
std::vector<std::string> dir =
Expand Down

0 comments on commit d1a2d23

Please sign in to comment.