Skip to content

Commit 7df7072

Browse files
committed
Minor tweaks
1 parent be74f6e commit 7df7072

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

MTADiag/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
#include <vector>
2323
#include "Log.h"
2424

25-
#define VERSION "2.4"
25+
#define VERSION "2.4.1"

MTADiag/Curl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ std::string Curl::CreatePasteBin ( std::string filePath, std::string pasteName )
105105
}
106106
}
107107

108-
void progress_callback ( void* percent, double TotalToDL, double CurrentDL, double TotalToUL, double CurrentUL )
108+
void progress_callback ( void*, double TotalToDL, double CurrentDL, double TotalToUL, double CurrentUL )
109109
{
110110
if ( TotalToDL > 0 ) { printf ( "Downloaded: %3.0f%%\r", CurrentDL/TotalToDL * 100 ); }
111111
else { printf ( "Uploaded: %3.0f%%\r", CurrentUL/TotalToUL * 100 ); }
112112
fflush ( stdout );
113113
}
114114

115-
size_t write_data ( void* ptr, size_t size, size_t nmemb, void* stream )
115+
size_t write_data ( void* ptr, size_t size, size_t nmemb, void* )
116116
{
117117
std::string temp ( static_cast <const char*> ( ptr ), size* nmemb );
118118
Curl::response.append ( temp );

MTADiag/Curl.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*
1313
*****************************************************************************/
1414

15-
#ifndef CCURL_H
16-
#define CCURL_H
15+
#pragma once
16+
1717
#include "Common.h"
1818

1919
namespace Curl {
@@ -22,6 +22,4 @@ namespace Curl {
2222
std::string CreatePasteBin ( std::string filePath, std::string pasteName );
2323

2424
static std::string response; // HTTP POST response
25-
}
26-
27-
#endif
25+
}

MTADiag/Diag.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void Diag::Begin ( void )
6565

6666
std::string DirectXState = ( CheckForFile ( files[4] ) ) ? "Yes" : "No";
6767
Log::WriteStringToLog ( "DirectX up-to-date: ", DirectXState );
68-
if ( DXUpdated == 0 )
68+
if ( DXUpdated == 1 )
6969
Log::WriteStringToLog ( "DirectX was updated: Yes");
7070

7171
if ( CompatRemoved1 == true || CompatRemoved2 == true )

MTADiag/Log.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
*
1313
*****************************************************************************/
1414

15-
#ifndef LOG_H
16-
#define LOG_H
15+
#pragma once
1716

1817
#include "Common.h"
1918

@@ -26,6 +25,4 @@ namespace Log {
2625
void WriteStringToLog ( std::string string, std::string string2 = "", bool endline = true );
2726

2827
static std::ofstream logfile;
29-
}
30-
31-
#endif
28+
}

MTADiag/util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ bool DeleteCompatibilityEntries ( std::string subkey, HKEY hKeyType )
103103
}
104104
}
105105
}
106-
return changed;
107106
RegCloseKey ( hKey ); // close the registry key
107+
return changed;
108108
}
109109
else
110110
{
@@ -147,7 +147,7 @@ bool IsVistaOrNewer ( void )
147147

148148
GetVersionEx ( &osvi );
149149

150-
if ( bIsVistaOrNewer = ( osvi.dwMajorVersion >= 6 ) )
150+
if ( ( bIsVistaOrNewer = ( osvi.dwMajorVersion >= 6 ) ) != 0 )
151151
return true;
152152
else
153153
return false;
@@ -164,7 +164,7 @@ bool IsWin8OrNewer ( void )
164164

165165
GetVersionEx ( &osvi );
166166

167-
if ( bIsWin8OrNewer = ( osvi.dwMajorVersion >= 6 && osvi.dwMinorVersion >= 2 ) )
167+
if ( ( bIsWin8OrNewer = ( osvi.dwMajorVersion >= 6 && osvi.dwMinorVersion >= 2 ) ) != 0 )
168168
return true;
169169
else
170170
return false;

0 commit comments

Comments
 (0)