Remove warning

This commit is contained in:
Andy Cedilnik 2002-10-10 08:11:37 -04:00
parent 089429fee9
commit f6a1218e10
2 changed files with 8 additions and 8 deletions

View File

@ -521,7 +521,7 @@ void cmMainFrame::ResizeInternal()
} }
void cmMainFrame::OnBrowseSource(wxCommandEvent&) void cmMainFrame::OnBrowseSource(wxCommandEvent&)
{ {
std::string path = this->m_PathSource->GetValue().c_str(); std::string path = this->m_PathSource->GetValue().c_str();
if ( path == "PathSource" ) if ( path == "PathSource" )
{ {
@ -1193,7 +1193,7 @@ void cmMainFrame::ClearCache()
} }
void cmMainFrame::OnBinaryAccepted(wxCommandEvent& event) void cmMainFrame::OnBinaryAccepted(wxCommandEvent&)
{ {
std::cout << "Pressed enter in binary field" << std::endl; std::cout << "Pressed enter in binary field" << std::endl;
} }
@ -1308,14 +1308,11 @@ void cmMainFrame::LoadFromRegistry()
} }
} }
} }
delete conf; delete conf;
} }
void cmMainFrame::SaveToRegistry() void cmMainFrame::SaveToRegistry()
{ {
//wxConfigBase *conf = (wxConfigBase*) wxConfigBase::Get();//new wxConfig("CMakeSetup"); //wxConfigBase *conf = (wxConfigBase*) wxConfigBase::Get();//new wxConfig("CMakeSetup");
wxConfig *conf = new wxConfig("CMakeSetup"); wxConfig *conf = new wxConfig("CMakeSetup");
conf->SetPath("Settings/StartPath"); conf->SetPath("Settings/StartPath");

View File

@ -60,25 +60,28 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
return true; return true;
} }
} }
// look for FORCE argument // look for FORCE argument
if (args.size() > 4 && args[args.size()-1] == "FORCE") if (args.size() > 4 && args[args.size()-1] == "FORCE")
{ {
force = true; force = true;
} }
std::vector<std::string>::size_type arg4, arg5;
arg4 = 4 + (force ? 1 : 0);
arg5 = 5 + (force ? 1 : 0);
if(args.size() == 2) if(args.size() == 2)
{ {
// SET (VAR value ) // SET (VAR value )
value= args[1]; value= args[1];
} }
else if(args.size() == 4 + (force ? 1 : 0)) else if(args.size() == arg4)
{ {
// SET (VAR CACHE TYPE "doc String") // SET (VAR CACHE TYPE "doc String")
cache = true; cache = true;
cacheStart = 1; cacheStart = 1;
} }
else if(args.size() == 5 + (force ? 1 : 0)) else if(args.size() == arg5)
{ {
// SET (VAR value CACHE TYPE "doc string") // SET (VAR value CACHE TYPE "doc string")
cache = true; cache = true;