Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 264141d

Browse files
Using string.empty
1 parent a93e05b commit 264141d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/GitHub.Api/Helpers/AssemblyResources.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static NPath ToFile(ResourceType resourceType, string resource, NPath des
2525
: resourceType == ResourceType.Platform ? "PlatformResources"
2626
: "Resources";
2727
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(
28-
String.Format("GitHub.Unity.{0}{1}.{2}", type, os != "" ? "." + os : os, resource));
28+
String.Format("GitHub.Unity.{0}{1}.{2}", type, !string.IsNullOrEmpty(os) ? "." + os : os, resource));
2929
if (stream != null)
3030
return destinationPath.Combine(resource).WriteAllBytes(stream.ToByteArray());
3131

src/GitHub.Api/IO/NiceIO.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public NPath ChangeExtension(string extension)
222222

223223
var newElements = (string[])_elements.Clone();
224224
newElements[newElements.Length - 1] = FileSystem.ChangeExtension(_elements[_elements.Length - 1], WithDot(extension));
225-
if (extension == string.Empty)
225+
if (string.IsNullOrEmpty(extension))
226226
newElements[newElements.Length - 1] = newElements[newElements.Length - 1].TrimEnd('.');
227227
return new NPath(newElements, _isRelative, _driveLetter);
228228
}

src/GitHub.Api/OutputProcessors/LogEntryOutputProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public override void LineReceived(string line)
175175
break;
176176

177177
case ProcessingPhase.Files:
178-
if (line == string.Empty)
178+
if (string.IsNullOrEmpty(line))
179179
{
180180
ReturnGitLogEntry();
181181
return;

src/UnityExtension/Assets/Editor/GitHub.Unity/ScriptObjectSingleton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private NPath FilePath
3737
{
3838
if (nFilePath == null)
3939
{
40-
if (filePath == "")
40+
if (string.IsNullOrEmpty(filePath))
4141
return null;
4242
if (filePath == null)
4343
filePath = GetFilePath();

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PublishView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public override void OnGUI()
161161
var organization = owners[selectedOwner] == username ? null : owners[selectedOwner];
162162

163163
var cleanRepoDescription = repoDescription.Trim();
164-
cleanRepoDescription = cleanRepoDescription == string.Empty ? null : cleanRepoDescription;
164+
cleanRepoDescription = string.IsNullOrEmpty(cleanRepoDescription) ? null : cleanRepoDescription;
165165

166166
Client.CreateRepository(new NewRepository(repoName)
167167
{

0 commit comments

Comments
 (0)