mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
change StackContents to uint, able to use now mnemoric with 3 operands, shl IL near 64 bit (unknown error), add asm line to nasm error
24 lines
No EOL
433 B
C#
24 lines
No EOL
433 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.Build.Common
|
|
{
|
|
public static class ExtensionMethods
|
|
{
|
|
public static uint Sum(this IEnumerable<uint> source)
|
|
{
|
|
if (source == null)
|
|
{
|
|
throw new ArgumentNullException("source");
|
|
}
|
|
ulong sum = 0Lu;
|
|
foreach (uint val in source)
|
|
{
|
|
sum += val;
|
|
}
|
|
return (uint)sum;
|
|
}
|
|
}
|
|
} |