summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-12 17:58:09 -0500
committerAdam <Adam@anope.org>2010-12-12 17:58:09 -0500
commitaf8cf445b8f33899422295bb4c5bc61f4525eef5 (patch)
treea3b6650a013fcebad4f2c8b1f6a7b361f9acd2de /include
parentbe4ec3c0c48a5218a7a73165bc2a521556b2318b (diff)
Made version.cpp ok with an empty VERSION_EXTRA
Diffstat (limited to 'include')
-rw-r--r--include/version.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/include/version.cpp b/include/version.cpp
index f3a2af5a7..ae3ee883e 100644
--- a/include/version.cpp
+++ b/include/version.cpp
@@ -53,7 +53,6 @@ int main(int argc, char *argv[])
fd.open(argv[2], std::ios::in);
std::string version_build = "#define VERSION_BUILD 1";
- std::string version_extra;
std::string build = "#define BUILD 1";
if (fd.is_open())
{
@@ -61,12 +60,6 @@ int main(int argc, char *argv[])
{
if (!filebuf.find("#define VERSION_BUILD"))
version_build = filebuf;
- else if (!filebuf.find("#define VERSION_EXTRA"))
- {
- size_t q = filebuf.find('"');
-
- version_extra = filebuf.substr(q + 1, filebuf.length() - q - 2);
- }
else if (!filebuf.find("#define BUILD"))
{
size_t tab = filebuf.find(' ');
@@ -96,12 +89,7 @@ int main(int argc, char *argv[])
for (std::list<std::pair<std::string, std::string> >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it)
{
if (it->first == "EXTRA")
- {
- if (!version_extra.empty())
- fd << "#define VERSION_EXTRA \"" << version_extra << "\"" << std::endl;
- else
- fd << "#define VERSION_EXTRA \"" << it->second << "\"" << std::endl;
- }
+ fd << "#define VERSION_EXTRA \"" << it->second << "\"" << std::endl;
else
fd << "#define VERSION_" << it->first << " " << it->second << std::endl;
}