Skip to content

Commit

Permalink
Comment pass, fix sourcebench.csv not properly backing up
Browse files Browse the repository at this point in the history
  • Loading branch information
HurpDurp committed Mar 2, 2016
1 parent b8156b7 commit 84c6cf2
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 218 deletions.
11 changes: 6 additions & 5 deletions TF2 Benchmarker/TF2 Benchmarker/Cvar.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace TF2_Benchmarker
{
/// <summary>
/// Struct containing a name and value, for storing TF2 console cvars.
///
/// It may contain a list of other cvars inside of it, for use in multiline commands.
/// </summary>
struct Cvar
{
public readonly string Command, Value;
Expand Down
7 changes: 6 additions & 1 deletion TF2 Benchmarker/TF2 Benchmarker/Ini.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@

namespace TF2_Benchmarker
{
/// <summary>
/// A class for saving and loading ini files.
/// Taken from http://www.codeproject.com/Articles/1966/An-INI-file-handling-class-using-C
/// </summary>
public class IniFile
{
public string path;

[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section,
string key, string val, string filePath);

[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section,
string key, string def, StringBuilder retVal,
Expand All @@ -27,7 +32,7 @@ public void IniWriteValue(string Section, string Key, string Value)

public string IniReadValue(string Section, string Key)
{
StringBuilder temp = new StringBuilder(255);
var temp = new StringBuilder(255);
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path);
return temp.ToString();
}
Expand Down
Loading

0 comments on commit 84c6cf2

Please sign in to comment.