Improvements by Cppcheck

This commit is contained in:
2015-06-23 10:39:31 +03:00
parent 43d6a2dd05
commit c1eb60d5c3
6 changed files with 7 additions and 15 deletions

View File

@@ -1,8 +0,0 @@
.PHONY: clean All
All:
@echo "----------Building project:[ wxCrossGen - Release ]----------"
@cd "wxCrossGen" && $(MAKE) -f "wxCrossGen.mk"
clean:
@echo "----------Cleaning project:[ wxCrossGen - Release ]----------"
@cd "wxCrossGen" && $(MAKE) -f "wxCrossGen.mk" clean

View File

@@ -63,7 +63,7 @@ void exportToString(const FilledCrossword &cross, wxString &str_out, wxChar spac
str_out += getGridString(cross, space) + getQuesString(cross);
}
bool exportToFile(const FilledCrossword &cross, const wxString path){
bool exportToFile(const FilledCrossword &cross, const wxString &path){
wxTextFile f(path);
if ( f.Exists() )
return false;

View File

@@ -15,6 +15,6 @@ wxString getQuesString(const FilledCrossword &cross);
void exportToString(const FilledCrossword &cross, wxString &str_out, wxChar space);
bool exportToFile(const FilledCrossword &cross, const wxString path);
bool exportToFile(const FilledCrossword &cross, const wxString &path);
#endif // CROSSEXPORT_HPP

View File

@@ -7,7 +7,7 @@ const TransedChar TRANS_CLEAR = 0;
const TransedChar TRANS_BORDER = 1;
const uint32_t MAX_WORD_COUNT = 262144; // =2^18
void readDict(const wxString path, DictType &dict_out){
void readDict(const wxString &path, DictType &dict_out){
wxTextFile f;
f.Open(path);
for (wxString str = f.GetFirstLine(); !f.Eof(); str = f.GetNextLine()) {
@@ -19,7 +19,7 @@ void readDict(const wxString path, DictType &dict_out){
f.Close();
};
void readGrid(const wxString path, GridType &grid){
void readGrid(const wxString &path, GridType &grid){
wxTextFile f;
f.Open(path);
wxString str = f.GetFirstLine();

View File

@@ -17,9 +17,9 @@ extern const TransedChar TRANS_CLEAR ;
extern const TransedChar TRANS_BORDER ;
extern const uint32_t MAX_WORD_COUNT ;
void readDict(const wxString path, DictType &dict_out);
void readDict(const wxString &path, DictType &dict_out);
void readGrid(const wxString path, GridType &grid);
void readGrid(const wxString &path, GridType &grid);
wxString getFromTransed(const TransedWord &tw, const BackedCharsTransType &bchar_trans);

View File

@@ -1 +1 @@
../Release/main.cpp.o ../Release/fmain.cpp.o ../Release/fsettings.cpp.o ../Release/src_crossexport.cpp.o ../Release/src_crossgen.cpp.o ../Release/fbgui_fbgui.cpp.o
./Debug/main.cpp.o ./Debug/fmain.cpp.o ./Debug/fsettings.cpp.o ./Debug/src_crossexport.cpp.o ./Debug/src_crossgen.cpp.o ./Debug/fbgui_fbgui.cpp.o