Skip to content

Commit a00b95b

Browse files
author
Aapo Kyrola
committed
added static keywords to prevent problems when using cpp files: #3
1 parent bf9540d commit a00b95b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/preprocessing/conversions.hpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ namespace graphchi {
163163

164164

165165
// http://www.linuxquestions.org/questions/programming-9/c-list-files-in-directory-379323/
166-
int getdir (std::string dir, std::vector<std::string> &files);
167-
int getdir (std::string dir, std::vector<std::string> &files)
166+
static int VARIABLE_IS_NOT_USED getdir (std::string dir, std::vector<std::string> &files);
167+
static int VARIABLE_IS_NOT_USED getdir (std::string dir, std::vector<std::string> &files)
168168
{
169169
DIR *dp;
170170
struct dirent *dirp;
@@ -180,8 +180,8 @@ namespace graphchi {
180180
return 0;
181181
}
182182

183-
std::string get_dirname(std::string arg);
184-
std::string get_dirname(std::string arg) {
183+
static VARIABLE_IS_NOT_USED std::string get_dirname(std::string arg);
184+
static VARIABLE_IS_NOT_USED std::string get_dirname(std::string arg) {
185185
size_t a = arg.find_last_of("/");
186186
if (a != arg.npos) {
187187
std::string dir = arg.substr(0, a);
@@ -192,8 +192,8 @@ namespace graphchi {
192192
}
193193
}
194194

195-
std::string get_filename(std::string arg);
196-
std::string get_filename(std::string arg) {
195+
static std::string VARIABLE_IS_NOT_USED get_filename(std::string arg);
196+
static std::string VARIABLE_IS_NOT_USED get_filename(std::string arg) {
197197
size_t a = arg.find_last_of("/");
198198
if (a != arg.npos) {
199199
std::string f = arg.substr(a + 1);
@@ -354,7 +354,8 @@ namespace graphchi {
354354
* @param[in] line line from input file containing node indices
355355
* @param[out] adjacencies node indices extracted from line
356356
*/
357-
static std::vector<vid_t> parseLine(std::string line) {
357+
static std::vector<vid_t> VARIABLE_IS_NOT_USED parseLine(std::string line);
358+
static std::vector<vid_t> VARIABLE_IS_NOT_USED parseLine(std::string line) {
358359

359360
std::stringstream stream(line);
360361
std::string token;
@@ -657,8 +658,8 @@ namespace graphchi {
657658
* Converts a graph input to shards with no edge values. Preprocessing has several steps,
658659
* see sharder.hpp for more information.
659660
*/
660-
int convert_none(std::string basefilename, std::string nshards_string);
661-
int convert_none(std::string basefilename, std::string nshards_string) {
661+
static int VARIABLE_IS_NOT_USED convert_none(std::string basefilename, std::string nshards_string);
662+
static int VARIABLE_IS_NOT_USED convert_none(std::string basefilename, std::string nshards_string) {
662663
sharder<dummy> sharderobj(basefilename);
663664
sharderobj.set_no_edgevalues();
664665

0 commit comments

Comments
 (0)