diff --git a/PluginCommon/AddressTranslate.cs b/PluginCommon/AddressTranslate.cs index b3ae29d..fd6af4e 100644 --- a/PluginCommon/AddressTranslate.cs +++ b/PluginCommon/AddressTranslate.cs @@ -27,6 +27,14 @@ namespace PluginCommon { /// /// This is currently simple enough that it could just be an interface, but I don't want /// to rely on that remaining true. + /// + /// TODO(maybe): add a "IsAddressRangeValid(int srcOffset, int addr, int length)" method + /// that verifies an entire address range is in memory. This would allow subsequent access + /// to skip error checks. (You still have to do the address-to-offset translation on every + /// byte though, which is where most of the expense is.) + /// TODO(maybe): add a "CopyAddressRange(byte[] data, int srcOffset, int addr, int length)" + /// that returns a newly-allocated buffer with the data copied out. This would allow fast + /// access to data that is split into multiple regions. /// public class AddressTranslate { private AddressMap mAddrMap; diff --git a/PluginCommon/VisWireframe.cs b/PluginCommon/VisWireframe.cs index 0e94bc0..865cc35 100644 --- a/PluginCommon/VisWireframe.cs +++ b/PluginCommon/VisWireframe.cs @@ -192,7 +192,7 @@ namespace PluginCommon { } // check edge-faces - foreach (IntPair ip in mVertexFaces) { + foreach (IntPair ip in mEdgeFaces) { if (ip.Val0 < 0 || ip.Val0 >= edgeCount || ip.Val1 < 0 || ip.Val1 >= faceCount) { msg = "invalid edge-face (e=" + ip.Val0 + ", f=" + ip.Val1 + ")";