[Scummvm-cvs-logs] scummvm master -> 1e9fb123647c43e3895eacf2beca7ee09be2ae57
Littleboy
Littleboy at users.noreply.github.com
Thu Sep 12 04:03:52 CEST 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8b56d0792c CREATE_PROJECT: Remove usage of std::to_string()
1e9fb12364 DEVTOOLS: Fix warning in extract_mort
Commit: 8b56d0792cace06693b18af3fe848f66434fc4cd
https://github.com/scummvm/scummvm/commit/8b56d0792cace06693b18af3fe848f66434fc4cd
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-11T18:22:06-07:00
Commit Message:
CREATE_PROJECT: Remove usage of std::to_string()
Changed paths:
devtools/create_project/create_project.cpp
devtools/create_project/create_project.h
devtools/create_project/msbuild.cpp
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 3ee5fc4..7ae2df3 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -39,7 +39,7 @@
#include <fstream>
#include <iostream>
-
+#include <sstream>
#include <stack>
#include <algorithm>
#include <iomanip>
@@ -966,6 +966,10 @@ bool producesObjectFile(const std::string &fileName) {
return false;
}
+std::string toString(int num) {
+ return static_cast<std::ostringstream*>(&(std::ostringstream() << num))->str();
+}
+
/**
* Checks whether the give file in the specified directory is present in the given
* file list.
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index d0f2db3..5325bf6 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -303,6 +303,14 @@ void splitFilename(const std::string &fileName, std::string &name, std::string &
bool producesObjectFile(const std::string &fileName);
/**
+* Convert an integer to string
+*
+* @param num the integer to convert
+* @return string representation of the number
+*/
+std::string toString(int num);
+
+/**
* Structure representing a file tree. This contains two
* members: name and children. "name" holds the name of
* the node. "children" does contain all the node's children.
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 7bab5c1..0d68b2e 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -116,8 +116,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
// Shared configuration
project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
- std::string version = "v" + std::to_string(_version) + "0";
- std::string llvm = "LLVM-vs" + std::to_string(getVisualStudioVersion());
+ std::string version = "v" + toString(_version) + "0";
+ std::string llvm = "LLVM-vs" + toString(getVisualStudioVersion());
outputConfigurationType(setup, project, name, "Release|Win32", version);
outputConfigurationType(setup, project, name, "Analysis|Win32", version);
Commit: 1e9fb123647c43e3895eacf2beca7ee09be2ae57
https://github.com/scummvm/scummvm/commit/1e9fb123647c43e3895eacf2beca7ee09be2ae57
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-11T18:22:07-07:00
Commit Message:
DEVTOOLS: Fix warning in extract_mort
Changed paths:
devtools/extract_mort/extract_mort.cpp
diff --git a/devtools/extract_mort/extract_mort.cpp b/devtools/extract_mort/extract_mort.cpp
index 159309c..4346f1f 100644
--- a/devtools/extract_mort/extract_mort.cpp
+++ b/devtools/extract_mort/extract_mort.cpp
@@ -104,10 +104,10 @@ public:
return ftell(f);
}
uint32 size() {
- int pos = ftell(f);
+ int position = ftell(f);
fseek (f, 0, SEEK_END);
int end = ftell (f);
- fseek (f, pos, SEEK_SET);
+ fseek (f, position, SEEK_SET);
return end;
}
More information about the Scummvm-git-logs
mailing list